Skip to content

Instantly share code, notes, and snippets.

@ggarnier
Created January 14, 2016 11:06
Show Gist options
  • Save ggarnier/95798344c786f4c53758 to your computer and use it in GitHub Desktop.
Save ggarnier/95798344c786f4c53758 to your computer and use it in GitHub Desktop.
Remove line from files using sed
sed -i '' '/expression/d' ./file*
# or, if you have a deep directory tree...
find . -name file* -maxdepth 3 -exec sed -i '' '/expression/d' {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment