Karan Sharma

Counting Lines in Files with Bash

0 minutes (46 words)

To get wc -l for each file in the directory:

wc -l *.csv

To output the number of lines, sorted in decreasing order:

wc -l *.csv | sort -rn

Tags: #Shell