Skip to content

Instantly share code, notes, and snippets.

@pichuang
Created June 29, 2014 00:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pichuang/71c76dd2422a657577ab to your computer and use it in GitHub Desktop.
Save pichuang/71c76dd2422a657577ab to your computer and use it in GitHub Desktop.
python2 python3 switch for archlinux or others
#!/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