Created
January 7, 2013 07:06
-
-
Save ShadowKyogre/4473066 to your computer and use it in GitHub Desktop.
Bored, so I wrote this possibly pointless script. Basically, it takes input arguments like this: getpython.sh 3 0 3
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 | |
for i in $(seq "$2" "$3") | |
do | |
which "python${1}.${i}" && exit 0 | |
done | |
which "python${1}" || echo "$PYTHONBIN" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment