Skip to content

Instantly share code, notes, and snippets.

@acook
Created August 13, 2013 11:39
Show Gist options
  • Save acook/6220298 to your computer and use it in GitHub Desktop.
Save acook/6220298 to your computer and use it in GitHub Desktop.
if it displays "0" then the shell is zero indexed, if it displays "1" then its 1-indexed
export INDEX=('1' '0')
echo ${INDEX[1]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment