Aliases in .bashrc
I made the two following aliases in the .bashrc in my home directory....
alias mcd='mount /dev/hdb /cdrom'
alias ucd='umount /cdrom'
They work fine, but I also want to immediately jump to /cdrom when I mount a CD. Thus I ammended the mcd alias to read...
alias mcd='mount /dev/hdb /cdrom|cd /cdrom'
This didn't work and I wonder if this is because aliases can only execute one bash command, or if I did something wrong.
The solution, I guess, would be to write a shell script and make the alias point to that, but I think one line aliases are neater.
Hans
Reply to: