Skip to content

Instantly share code, notes, and snippets.

@ShadowKyogre
Created January 7, 2013 07:06
Show Gist options
  • Save ShadowKyogre/4473066 to your computer and use it in GitHub Desktop.
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
#!/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