Skip to content

Instantly share code, notes, and snippets.

@rtomaszewski
Created June 17, 2013 18:49
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 rtomaszewski/5799274 to your computer and use it in GitHub Desktop.
Save rtomaszewski/5799274 to your computer and use it in GitHub Desktop.
Example of tables in Bash
#!/bin/bash
TESTS[0]=a,b,c
TESTS[1]=1,2,3
for row in "${TESTS[@]}"; do
IFS=","
set $row
col1=$1
col2=$2
col3=$3
echo "row was: $row"
echo "col1 is $col1, col2 is $col2, col3 is $col3"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment