Created
June 29, 2014 00:54
-
-
Save pichuang/71c76dd2422a657577ab to your computer and use it in GitHub Desktop.
python2 python3 switch for archlinux or others
This file contains 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 | |
VERSION=$1 | |
if [ "python2" == "$VERSION" ] || [ "python3" == "$VERSION" ] | |
then | |
cd /usr/bin/ | |
ln -sfn $VERSION python | |
echo "switch to $VERSION" | |
else | |
echo "Please type \"python2\" or \"python3\" " | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment