The-Unix-Shell-Teaching-Notes

7.5 find Pipeline Reading Comprehension

Write a short explanatory comment for the following shell script:

wc -l $(find . -name "*.dat") | sort -n
Solution
  1. Find all files with a .dat extension recursively from the current directory
  2. Count the number of lines each of these files contains
  3. Sort the output from step 2. numerically

End