Skip to content

Instantly share code, notes, and snippets.

@ianchen06
Created August 3, 2017 09:44
Show Gist options
  • Save ianchen06/14307bad6f2131201792a4c42fecf49e to your computer and use it in GitHub Desktop.
Save ianchen06/14307bad6f2131201792a4c42fecf49e to your computer and use it in GitHub Desktop.
useful linux commands
#!/bin/sh
# replace words in file recursively
grep -r 'hello' -l --null . | xargs -0 sed -i 's#hello#world#g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment