How to count lines?

0192

To count the number of lines in a file, you can use the wc (word count) command with the -l option. Here’s how to do it:

wc -l filename.txt

Replace filename.txt with the name of the file you want to count the lines in. The output will show the number of lines followed by the file name. For example:

wc -l requirements.txt

Output:

51 requirements.txt

This indicates that the requirements.txt file contains 51 lines. If you have any other questions or need further assistance, feel free to ask!

0 Comments

no data
Be the first to share your comment!