Shell Count Lines
Pipe them into wc.
To count files in a folder:
shell
# The -l flag counts lines specifically.
ls folder | wc -l
> 1330Count unique lines in a file
To get counts of sorted repeated lines in a file:
shell
sort FILE.txt | uniq -cTo get the most frequent ones at the top of the command:
shell
sort FILE.txt | uniq -c | sort -bgr