I have a file named test which has two columns one having ID and other having status.
I want to loop through the file and print IDs where status have one particular value (e.g. 'ACTIVE').
I tried
cat test | while read line; do templine= $($line | cut -d ' ' -f 2);echo $templine; if [ $templine = 'ACCEPTED' ]; then echo "$templine"; fi done
and some variation of above which obviously did not work.
Any help would be appreciated.
