Count number of files in directory using bash
To count the number of files in a directory using a bash shell, one can use a variation of:
ls -1 | wc -lsuch as
ls -1 *.tsv | wc -lNote that the option after ls is the number "1" and not the letter "l". This will take the output of ls and pipe it to wordcount with the newline option, where it counts the number of newline characters.