Created
August 12, 2011 20:53
-
-
Save fczuardi/1142975 to your computer and use it in GitHub Desktop.
Trouble remembering ln -s source/target order?
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/bash | |
| ln -s $1 $2 | |
| if [ $? -ne 0 ]; then | |
| read -p "Try the inverse?" yn | |
| case $yn in | |
| [Yy]* ) `ln -s $2 $1`; | |
| esac | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment