Reputation: 233
I set the following linux alias command in .bashrc
, but it does not work.
Could some one tell me how to set it?
alias svngui='cd /home/personal_folders/j.jia/jhy_bin/WorkBench-1.6.8/Source; sh wb.sh&; cd -'
Upvotes: 1
Views: 624
Reputation: 80
Your code will produce a syntax error which says "syntax error near unexpected token `;'". You need to enclosed your command with parentheses like this (sh wb.sh &);
So you can include your alias in .bashrc like this:
alias svngui='cd /home/personal_folders/j.jia/jhy_bin/WorkBench-1.6.8/Source; (sh wb.sh&); cd -'
Upvotes: 3
Reputation: 78700
Use parentheses in your alias:
alias foo='cd /dir/one ; (command &) ; cd /other/dir'
If it is okay to have wb.sh
to be executed in a subshell. Redirect the output of command
(sh wb.sh
in your case) as needed.
Upvotes: 2