Skip to content

Instantly share code, notes, and snippets.

@shantanuo
Forked from funroll/gist:5504098
Last active August 29, 2015 14:13
Show Gist options
  • Save shantanuo/fb07fbb66bc192108dca to your computer and use it in GitHub Desktop.
Save shantanuo/fb07fbb66bc192108dca to your computer and use it in GitHub Desktop.
$ cd /tmp
$ echo "foo bar baz foo foo quz" > test1
$ echo "bar bar foo bar baz foo quz foo foo" > test2
$ sed -i '.bak' 's/foo/replaced/g' test*
$ tail test1 test2
==> test1 <==
replaced bar baz replaced replaced quz
==> test2 <==
bar bar replaced bar baz replaced quz replaced replaced
$ which sed
/usr/bin/sed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment