shx
shx copied to clipboard
sed should be silent if '-i' is provided
$ sed -i 's/foo/bar/g' file.txt # note: this is silent
$ cat file.txt
bar
$ shx sed -i 's/bar/baz/g' file.txt # this should be silent
baz
$ shx cat file.txt
baz
We could arguably make the change in shelljs itself (which would help n_shell
).
This will be fixed in the next shelljs release. This is a breaking change in shelljs, so it might take a bit to get it released.
Keeping this open since we'll need to pull in a new shelljs version to get this fixed in shx.
any ETA on when this will be fixed?
Workaround:
shx sed -i "s/original/replaced/g" myfile.txt > hidden.txt && shx rm -f hidden.txt