How to get “wc -l” to print just the number of lines without file name?

Try this way:

wc -l < file.txt

Leave a Comment