sed

Here’s some hints on using sed.

A cheatsheet by @rstacruz|Refreshed 7 months ago.Refresh|View source on Github

In-place replacement (GNU)

In-place replacement (GNU)

sed -i -e 's/foo/bar/' example.md

In GNU sed: use -i without arg.

In-place replacement (BSD)

sed -i '' -e 's/foo/bar/' example.md

In OSX, -i '' is required.