Hi all,
I have a tab-delimited text file of size 10Mb. I am trying to count the number of lines using,
grep -c . sample.txt
or
wc -l < sample.txt
or
awk 'END {print NR}' sample.txt
All these commands shows the count as 1, which means they are reading only the first header line of the file. None of the commands are giving the correct count of lines.
Could anyone help to get the count of all lines in the file using awk. A sample file is attached for reference.