dspinellis / dgsh

Shell supporting pipelines to and from multiple processes
http://www.spinellis.gr/sw/dgsh/
Other
323 stars 23 forks source link

multi-field cut doesn't work as expected in legacy pipelines #63

Closed abliss closed 7 years ago

abliss commented 7 years ago
abliss@localhost:$ echo "foo bar baz" | /usr/bin/cut -d' ' -f 1,3
foo baz
abliss@localhost:$ echo "foo bar baz" | cut -d' ' -f 1,3
foo abliss@localhost:$
abliss@localhost:$ echo "foo bar baz" | cut -d' ' -f 1,3 --multistream
foo abliss@localhost:$
dspinellis commented 7 years ago

The second case looks like a bug. The third case misses a way to gather the data. (But it should error, when closing the second output file descriptor.) The following works.

$ dgsh -c 'echo "foo bar baz" | cut -d" " --multistream -f 1,3 | paste'
foo     baz