Last active
August 29, 2015 14:19
-
-
Save emlai/0bc39eb7d7bb6b67cccd to your computer and use it in GitHub Desktop.
Count number of lines in each file in a directory, sort output by line count
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wc -l src/*.{cpp,h} | sort -r | |
# wc "word count" utility | |
# -l count lines | |
# src/* in directory named "src" | |
# *.{cpp,h} files with extension .cpp or .h | |
# | sort sort output of wc | |
# -r sort greatest first (reverse order) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment