Debian Codegraph @

test/clos1way2.awk

raw
1 {
2 # We use "&&" and not ";" so it works with Windows shells as well.
3 cmd = "cat - 1>&2 && sleep 2"
4 print |& cmd; close(cmd, "to")
5 fflush(cmd)
6 print |& cmd; print ERRNO
7 }