A simplified version of my code looks like the following:declare -a DMN=(  200 190 180)NRL=3runDHFiles(){awk 'NR>13 {if ($4==$DMN[$i]) print $1, $2, $3, $4;}' domain_all.dat >> ddh_domain_${DMN[$i]}.dat}for ((i = 1; i <= NRL; i++ )); do   runDHFilesdoneI'm trying to loop over a large Excel file and copy the rows where the domain flag (in column 4) equals a certain number.If I do this, it works fine:if ($4==200)If I do this, it doesn't work:if ($4==$DMN[$i])How can I access value from the array in my loop for the equality statement?Thanks,Cole
AWK Using a Variable in an Equality Expression
linux;bash;shell;cygwin