Skip to content

Instantly share code, notes, and snippets.

@andersonvom
Created March 29, 2012 22:01
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 andersonvom/2244185 to your computer and use it in GitHub Desktop.
Save andersonvom/2244185 to your computer and use it in GitHub Desktop.
Bash Array
#!/bin/bash
vetor[0]="023 asdf asdf"
vetor[1]="123 asdf asdf"
vetor[2]="323 asdf asdf"
for i in 1 2 3
do
if [ "${vetor[0]}" \< "${vetor[i]}" ]
then
echo OK
else
echo NOK
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment