The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
5 views

avoid sigstop in script bash

alias notesave=' cwd=$(pwd) && cd ~/Desktop/Notes && git add * && git commit -a -q -m "-_\@" && git push -q origin master && echo "DONE!" && cd $cwd' ...
2
votes
2answers
33 views

One-line code in bashrc to edit pdf

I would like to have a one-line code in bashrc, for removing the first page of a pdf. The command to be typed in the bash prompt could of the form: cut name.pdf This command should remove the ...
0
votes
1answer
63 views

Alias to connect to AWS instance via SSH not working

I made an alias to make it easier to connect to my AWS EC2 instance. Although there is an error. Here is the code in ~/.bash_profile: alias aws_connect=‘ssh -i /path/to/keyfile.pem ...
0
votes
1answer
20 views

exiting current terminal in a script

I have made alias for running certain program and i have put it in .bashrc file. I want to close current terminal inside the script. I've tried this but it is not working. alias mp='java -jar ...
-1
votes
1answer
62 views

how to escape '$' in an awk statement in shell alias

I'm trying to write an alias that will kill all running php processes.. this is the command i got in my ~/.bash_profile alias killphp="ps aux | g [p]hp | awk '{print $3}' | xargs kill -9" this ...
0
votes
1answer
36 views

Alias not working

I have an alias that does an ssh into a machine and executes 1 line of code as following: alias posts-update= 'ssh user@host.com "cd /var/www/blog/posts && git pull"' This works perfectly ...
1
vote
2answers
422 views

Sudo doesn't work on Aliases

I have added alias ll='ls -la' in /etc/bash.bashrc but sudo ll is not working. Is there a way to "source" bash.bashrc? In a related post, another user suggesting creating an alias for sudo with a ...
0
votes
1answer
46 views

Trouble 'generating' bash aliases

In my ~/.shortcuts, I have symlinks to some frequently used directories. In .bashrc (OS X), I am doing this: ls -1 ~/.shortcuts | xargs -I {} alias {}="'cd -P ~/.shortcuts/{}'" When I run alias in ...
0
votes
2answers
248 views

Run bash_aliases on start

I have a separate file .bash_aliases , in the same directory as .bashrc, that I wish to be ran on start, I've added the lines: if [ -f ~/.bash_aliases ]; then . ~/.bash_aliases fi to my .bashrc ...
1
vote
1answer
78 views

Where is virtualenv's deactivate defined?

Virtualenv defines an alias for the command deactivate as seen in yourvirtualenv/bin/activate.csh. What I'm curious about is where deactivate resides, because when I issue an alias command deactivate ...
10
votes
4answers
19k views

How can I use a bash like shell on windows

I use Linux and a Mac. I'll be teaching some command line stuff soon. What can I install on Windows to give me a terminal window most similar to a basic mac/linux bash shell. Would like to be able to ...
1
vote
1answer
946 views

Terminal not working: -bash: exit: with: numeric argument required what to do?

I was trying to install F# compiler and interactive on my Mac, and part of the installation process required providing aliases in the bash profile file. I suspect that I messed something up here, ...
2
votes
1answer
712 views

Bash LS Options ~ Group Directories First

Locally I'm running Debian stable ~ bash -version 4.1.5 ... Remotely my server is running Centos 5-8.el5 bash -version 3.2.25 ... I have a .bash_alias file on both distros containing an alias 'll' ...
1
vote
1answer
267 views

Advanced alias in zsh shell

I'm using the zsh shell on ArchLinux and I want to know if there's an easy way to make "advanced" aliases. Normal aliases work just fine. However I can't find a way to create an alias for a ...
0
votes
3answers
79 views

Alias to add .mylongwebsiteaddress to end of lines in cygwin

I have a server called someserver and a website called mylongwebsiteaddress.com. Basically I always type $./somecommand.sh someserver.mylongwebsiteaddress.com in cygwin when doing updates to servers. ...
2
votes
8answers
983 views

Command to search programs in Linux

Do you have any easy idea to define some alias in .bashrc for finding some command that you want to search (when you forgot its name) in your machine, visiting all "bin" directories, maybe using ...
2
votes
1answer
132 views

Create an alias - in Bash?

How can I create an alias named - in Bash? None of the following works: alias -='cd -' alias \-='cd -' alias '-'='cd -' with error: bash: alias: -=: invalid option alias: usage: alias [-p] ...
0
votes
1answer
154 views

Alias settings not “sticking” when running Fedora in Parallels

Recently set up a Fedora 15 installation using the latest version of Parallels. Everything seems to be working fine, save for a particularly odd quirk. Whenever I set up an alias using something like ...
2
votes
2answers
280 views

Alias that allows to edit ~/.bashrc and then “sources” it automatically - Why it doesn't work?

I use MacBook Air with OSX 10.7.2. I would like to create an alias that does the following: Opens TextMate with ~/.bashrc and allows me to edit it Once I close TextMate, "sources" ~/.bashrc (so if ...
1
vote
2answers
215 views

append text to file including multiple quotes

I want to do this: echo alias get_python_lib='python -c "from distutils.sysconfig import get_python_lib; print get_python_lib();"' >> ~/.bash_aliases The result in my ~/.bash_aliases file is: ...
2
votes
3answers
310 views

Autocompleteable alias (or similar) in bash?

I have a CentOS host in my local network that I daily use to open SSH connections to many (over 40) other hosts in both Internet and the local network. I have set up RSA keypairs to skip the ...
2
votes
4answers
3k views

Aliases in .bash_profile do not work

I have added some cd blah blah commands as alias in my .bash_login so as to ease changing directories.It was working fine .Suddenly though none of the aliases in there work .It says command not found ...
0
votes
2answers
307 views

Set emacs to always run in background

In my bash terminal I have emacs set to run in XWindows. I prefer this to not freeze my terminal session so I run: emacs filename & Is there anyway to alias this? I have tried: ...
8
votes
3answers
3k views

Is it possible to override the command line's built in “cd” command?

Just about every time I 'cd' to a different directory on my machine (in this case, running Mac OS X 10.6.7) via the command line (which is bash), I immediately type 'ls' to get the list of contents in ...
1
vote
1answer
573 views

Creating an alias or function, need to be able to pass in a parameter

I want to wrap 3 lines of execution into an alias, but I also need to pass a parameter when I call it in terminal. Do I need to create a function for this? I'm new to this, but I know there are ...
2
votes
2answers
2k views

How to change default vi alias in Fedora 14?

In my laptop, if I type below $ which vi alias vi='vim' /usr/bin/vim Now I want to change the vi alias to another bin, e.g. vim_wrapper a script created in /usr/bin/, I type this line: alias ...
4
votes
2answers
955 views

Creating an alias containing bash history expansion

I often forget to run a command with sudo, so I find myself often typing sudo !! immediately afterwards. I tried aliasing this, but bash chokes on the !! part. Is there some way to represent this ...
3
votes
3answers
180 views

How can I create two identical aliases in bash?

I want to create two different aliases to the same command without repeating myself. How can I do it in bash? For example, I want listlong and longlist to both be aliases to "ls -al".
3
votes
1answer
358 views

Bash Alias to perform Alt+1?

Using Ubuntu I can create a terminal with two tabs: gnome-terminal --tab --tab However, by default it goes to the last created tab. Using Alt + 1 I can make it go to the first, but I want to avoid ...
6
votes
4answers
2k views

Unable to use scp with a bash alias

This code does not work: scp ~/Desktop/favicon.ico nameOfBashAlias:/public_html/mySite/templates/blog/ The alias is: alias nameOfBashAlias='ssh myUsername@11.11.11.111' How do I solve this ...