Debian Codegraph @

test/clos1way5.awk

raw
1 BEGIN {
2 # We use "&&" and not ";" so it works with Windows shells as well.
3 cmd = "echo test1&& echo test2&& sleep 2"
4 cmd |& getline x
5 print x
6 close(cmd, "from")
7 cmd |& getline x
8 print x
9 print ERRNO
10 }