Created
June 17, 2013 18:49
-
-
Save rtomaszewski/5799274 to your computer and use it in GitHub Desktop.
Example of tables in Bash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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