Skip to content

Instantly share code, notes, and snippets.

@Swarchal
Last active June 27, 2016 16:44
Show Gist options
  • Save Swarchal/ceb3776d09f28f6ca9eb073de2ebc77a to your computer and use it in GitHub Desktop.
Save Swarchal/ceb3776d09f28f6ca9eb073de2ebc77a to your computer and use it in GitHub Desktop.
remove lines containing string
sed '/string to match/d' ./file_to_remove_from.txt > output_file.txt
grep -v "string to match" file_to_remove_from.txt > output.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment