blob: c9dab09affb6ba382099039486c5f06a1ad5f0ed (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
BEGIN {
command = "sort"
n = split("abcdefghijklmnopqrstuvwxyz", a, "")
for (i = n; i > 0; i--) {
# print "printing", a[i] > "/dev/stderr"
print a[i] |& command
}
close(command, "to")
# print "starting read loop" > "/dev/stderr"
do {
if (line)
print "got", line
# stopme();
} while ((command |& getline line) > 0)
# print "doing final close" > "/dev/stderr"
close(command)
}
|