sed -i -e 's/foo/bar/' example.md
In GNU sed: use
-i without arg.
sed -i '' -e 's/foo/bar/' example.md
-i '' is required.
sed '/begin api/q'
sed '/^# begin/,$d'
sed -n '/end api/,$p'
Print after a given line is found.
sed -n '/regex/d;'
Print everything except lines matching regex. Useful for printing files with comments.
Subscribe to get resources directly to your inbox. You won't receive any spam! ✌️