1 2 3 4 5 6 7 8 9 10 |
# create new directory and cd in single command # ssh to remote host and go to directory ALL_HOSTS="hostname1 hostname2 hostname3" for AHOST in $ALL_HOSTS do alias ssh2"$AHOST"="sshcd $AHOST " done |
1 2 3 |
if [ -f ~/.bash_aliases ]; then . ~/.bash_aliases fi |