Skip to content

Instantly share code, notes, and snippets.

@lirenlin
Last active December 23, 2015 21:39
Show Gist options
  • Select an option

  • Save lirenlin/6697733 to your computer and use it in GitHub Desktop.

Select an option

Save lirenlin/6697733 to your computer and use it in GitHub Desktop.
replace all the occurrences of old text with new text
sed -i 's/old-word/new-word/g' *.txt
sed 's/old-word/new-word/g' input.txt > output.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment