Skip to content

Instantly share code, notes, and snippets.

@jdwhite
Last active August 13, 2022 17:32
Show Gist options
  • Save jdwhite/873d82ac7d5445f3b49f72f3a0750dc4 to your computer and use it in GitHub Desktop.
Save jdwhite/873d82ac7d5445f3b49f72f3a0750dc4 to your computer and use it in GitHub Desktop.
#!/bin/bash
# highest-version - determine highest version of $0 and exec.
# May need to modify '${0}*' if it matches more than the
# intended ${0} -- '${0}-*' for example.
exec $(ls -1 ${0}* | sort -rV | head -1) "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment