M Mỹ An New member Dec 27, 2021 #1 How do I count lines in a file? Answer The tool wc is the “word counter” in UNIX and UNIX-like operating systems, but you can also use it to count lines in a file by adding the -l option . wc -l foo will count the number of lines in foo .
How do I count lines in a file? Answer The tool wc is the “word counter” in UNIX and UNIX-like operating systems, but you can also use it to count lines in a file by adding the -l option . wc -l foo will count the number of lines in foo .