Nice one.
Note the usage() also states that both files being stdin
is not supported, so we should remove the " (not both)" qualification.
+# In coreutils 9.11 and earlier, running 'comm - -' would close
+# standard input twice, leading to an incorrect exit status.
+echo 'y' >exp || framework_failure_
+yes | head -n 1 | timeout 10 comm - - >out 2>err || fail=1
I'm a bit confused with the use of yes(1) here.
It might be better to use a more descriptive example
showing the alternation of lines consumed from the same input:
$ seq 9 | sed 'n;n;p' | src/comm - -
1
2
3
4
5
6
7
8
9
cheers,
Padraig