Type:
wc -l foo.txt
And the system returns:
12 foo.txt
Meaning foo.txt has 12 lines.
To count unique lines a file has:
sort -u foo.txt | wc -l
Which will simply exclude all extra lines that are identical.
Type:
wc -l foo.txt
And the system returns:
12 foo.txt
Meaning foo.txt has 12 lines.
To count unique lines a file has:
sort -u foo.txt | wc -l
Which will simply exclude all extra lines that are identical.