Help me to find the "n/a" record row no

Hi,

I need to find the "n/a" value presented row no. in my file i have following code but it gives all the row no. even i tried removing n/a by blank value and try to find the blank value it also failed.

awk -F\\t '{ if (NR == 1) { for (i=1;i<=NF;i++){if ($i==$3) { c=i } } };if (NR != 1) { if ($c = "n/a" ) printf  NR "," }}'  filename.tsv
col1	col2	col3
723	16708178	sap1
695	15085150	n/a
719	16708143	new
687	41532454	n/a
610	15083662	Little

Try:

awk -F"\t" '$3=="n/a"{print NR}' file

if i stored it in any variable and try to print that variable its giving 1 why?

Count1=$(awk -F"\t" '$3=="n/a"{print NR }' file_name.tsv)
Count_1=`echo $Count1 | awk -F, {'print NF'}`

Red indicates wrong place for the single quote.

awk -F, -> set delimiter to `,'
'{print NF}' -> display the number of fields, since nothing has a `,' the whole echo pipe is just `1' field. That's why. Remove the `-F,' and you'll see another story.