Bash basics example

List the number of lines in all of the csv data files.
wc -l *.csv

Next, remove the line containing the word “total”.
wc -l *.csv | grep -v total

Display the line with fewest number of lines
wc -l *.csv | grep -v total | sort -n | head -n1

Store results in a file
wc -l *.csv | grep -v total | sort -n | head -n1 > results.csv