My script when run
./program < "$1" | awk -F '!' '{print $3 $4, $5, $6, $7}
returns the values
900 200 30 400 5
51 31 2 3 4
How do I set a variable for the colummns for each line I have attempted
LINE=`./program < $1`
for i in $LINE
do
$LINE | awk -f '!' | read a b c d e <<< "$(echo $i | cut -f4 -d:}'
but no matter how I do it I can't seem to get values into variables
IFS='!' read a b c d e < <(./program < "$1")? EDIT: Since there are multiple lines in the output of./program, you need a while loop aroundread!-delimited values in the output fromprogram, butcut -f4 -d:looks like you want to extract the fourth out of a list of colon-delimited fields. Which is correct? Or do you have!-delimited fields inside:-delimited fields?