Blog

SED – change something inline

If you coming from linux side, you probably always used to:

sed -i 's/foo/bar/' filename

but with OSX sed it doesn’t work. what you need to add is file extension that you want to have your backup:

sed -i.bak 's/foo/bar/' filename

Leave a Comments

Marek Knappe