dspinellis / dgsh

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

text-properties.sh, line 55, tee <$1 causes "ambiguous redirect" #36

Closed ghost closed 7 years ago

ghost commented 7 years ago

The documentation for this example makes it clear that text-properties.sh is meant to work for either one filename argument or none. But I get an "ambiguous redirect" error if I do not give this script a filename on the command line.

This change made it so that it works for me in both cases:

`` @@ -52,7 +52,7 @@ export -f ranked_frequency export -f ngram

-tee <$1 | +tee < "${1-/dev/fd/0}" | {{

Split input one word per line

    tr -cs a-zA-Z \\n |

``

Or, you might prefer using 'cat $1 | ...'

-- Guy Shaw