shelljs / shx

Portable Shell Commands for Node
MIT License
1.73k stars 45 forks source link

sed does not accept input from pipes #108

Closed bardiharborow closed 7 years ago

bardiharborow commented 7 years ago

shx echo hello | shx sed 'hello' 'hola' crashes with sed: no files given despite the sed command appearing to accept input from pipes.

nfischer commented 7 years ago

Thanks for reporting this! What version of shx are you using? This was a recent feature in shx

bardiharborow commented 7 years ago

Ah. Stupidly I was running an older version, but this still occurs in 0.2.1. I'm running MacOS Sierra.

nfischer commented 7 years ago

I see no issues:

$ shx echo 'foolish' | shx sed 's/foo/bar/'
barlish

Remember the correct sed syntax on the newer versions of shx (sed was broken on older versions)