Skip to content

Instantly share code, notes, and snippets.

@rpg-314
Created September 29, 2010 06:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rpg-314/602369 to your computer and use it in GitHub Desktop.
Save rpg-314/602369 to your computer and use it in GitHub Desktop.
Tricks with sed
#print all files in this directory (recursively) with their full path
find . -type f | sed "s#^.#$(pwd)#"
#insert blah at the beginning of every line in a file
cat guinea_pig_file | sed "s/^/Blah /g"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment