I\'m trying to extract a row/column element from a text table using awk within a function in bash. Specifically:
getel() { awk -v col=$3 \'FNR==$2 {print $c
Or you could use bash variables directly:
awk 'NR=='$2'{print $'$3'}' $1
Pass another command line variable to awk:
getel() { awk -v row=$2 -v col=$3 'NR==row {print $col }' $1 }