I have a loop in a bash script that processes a number of files in a folder. In my loop, for each file, I execute the below line:
awk -F":" '{ print "Name: " $1 "\t\tID:" $3 }' $file
I would like to collect the output of all the files processed in some bash variable/array for other processing outside the loop. How can I achieve this in bash?
bash
. – phk Oct 30 '16 at 8:28