Last active
September 6, 2016 08:54
-
-
Save samdoidge/f375aee2cd72dbc22b3fca3f676d57c7 to your computer and use it in GitHub Desktop.
Recursively loop through a direcctory, cutting files down to 11 lines maximum - creating a new file of the same name in a Test folder.
This file contains hidden or 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
for file in *; do head -n 11 "$file" > ../Test/"$file"; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment