sed -i '' does not work on linux
thorhs opened this issue · comments
I think the sed -i '' command only works on OSX, on linux I have to remove the '' part.
Thanks... what is the equivalent for edit files in place
? I am on mac, but my gsed
also shows -i
.
man gsed
-i[SUFFIX], --in-place[=SUFFIX]
edit files in place (makes backup if SUFFIX supplied)
...
man sed
-i extension
Edit files in-place, saving backups with the specified extension. If a zero-
length extension is given, no backup will be saved. It is not recommended to
give a zero-length extension when in-place editing files, as you risk corrup-
tion or partial content in situations where disk space is exhausted, etc.
It is still -i, just without the ''.
so: sed -i /tmp/test.x 's/test/junk/'
On Tue, Jan 12, 2016 at 2:08 PM, Reuben Cummings notifications@github.com
wrote:
Thanks... what is the equivalent for edit files in place? I am on mac,
but my gsed also shows -i.man gsed
...
-i[SUFFIX], --in-place[=SUFFIX]edit files in place (makes backup if SUFFIX supplied)
...
man sed
-i extension
Edit files in-place, saving backups with the specified extension. If a zero-
length extension is given, no backup will be saved. It is not recommended to
give a zero-length extension when in-place editing files, as you risk corrup-
tion or partial content in situations where disk space is exhausted, etc.—
Reply to this email directly or view it on GitHub
#5 (comment).