Created
July 29, 2009 15:23
-
-
Save erikbgithub/158211 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh #################################################################### | |
# | |
# author: Erik Bernoth | |
# | |
# tricks the mac 10.5 terminal tab name into writing the ssh position instead | |
# of just "ssh" | |
# | |
# (c) 2009, do with this program what you want | |
# | |
############################################################################## | |
if [[ -z $2 ]]; then | |
user="root" | |
else | |
user=$2 | |
fi | |
ln /usr/bin/ssh /usr/bin/ssh-$1 | |
echo "ssh-$1 ${user}@$1" | |
ssh-$1 ${user}@$1 | |
# in any case, try to delete the temporary link | |
trap "rm /usr/bin/ssh-$1" 0 1 2 3 10 11 15 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment