Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sed should be silent if '-i' is provided #159

Open
nfischer opened this issue Dec 7, 2018 · 2 comments · Fixed by shelljs/shelljs#959
Open

sed should be silent if '-i' is provided #159

nfischer opened this issue Dec 7, 2018 · 2 comments · Fixed by shelljs/shelljs#959

Comments

@nfischer
Copy link
Member

nfischer commented Dec 7, 2018

$ 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).

@nfischer
Copy link
Member Author

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.

@wondering639
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants