I want to know how to get the number of rows in a text file using Linux. I have tried "wc " and "wc -l ", but both display only the number of lines (columns) not the rows. Any idea?
wc -l < <filename> displays lines for me
example file with numbers 1 - 7
scottsmudger@ns207588:~ $wc -l < test 7
From the man page:
-l, --lines print the newline counts