I would like to swap from csh to bash, then I have to set the .bashrc with the commands I use. Translating alias with parameters seems to be not easier as I believed. csh:
alias gr 'xmgrace -legend load -nxy \!* -free -noask&'
the param \!*
means all params on the command line; Then I tried for bash:
alias gr='xmgrace -legend load -nxy $@ -free -noask&'
alias gr='xmgrace -legend load -nxy $(@) -free -noask&'
But neither worked.
The other issue comes from memorizing the current directory csh:
alias t 'set t=\`pwd\``;echo $t'
alias tt 'cd $t'
I tried a lot of things but without any results.
alias
cannot use parameters. for this you need to write a function. – fedorqui Aug 26 '15 at 17:02