Created
January 27, 2014 16:03
-
-
Save robmiller/8651287 to your computer and use it in GitHub Desktop.
Prepend line to files in shell
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
# requires sponge, from joey hess's moreutils | |
# http://joeyh.name/code/moreutils/ | |
for i in *.txt; do; echo "line to prepend\n" "$(cat $i)" | sponge $i; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment