Skip to content

Instantly share code, notes, and snippets.

@whbzju
Last active June 18, 2017 15:41
Show Gist options
  • Save whbzju/34ac057e25cb6b79bff1e72f68c2eb48 to your computer and use it in GitHub Desktop.
Save whbzju/34ac057e25cb6b79bff1e72f68c2eb48 to your computer and use it in GitHub Desktop.
To remove the line and print the output to standard out:
sed '/pattern to match/d' ./infile
To directly modify the file (and create a backup):
sed -i.bak '/pattern to match/d' ./infile
sed 's/\*/t/g' test.txt > test2.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment