Debian Codegraph @

test/clos1way4.awk

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