source:
trunk/essentials/sys-apps/gawk/test/clos1way.awk
Last change on this file was 3076, checked in by , 18 years ago | |
---|---|
File size: 405 bytes |
Line | |
---|---|
1 | BEGIN { |
2 | command = "LC_ALL=C sort" |
3 | |
4 | n = split("abcdefghijklmnopqrstuvwxyz", a, "") |
5 | for (i = n; i > 0; i--) { |
6 | # print "printing", a[i] > "/dev/stderr" |
7 | print a[i] |& command |
8 | } |
9 | |
10 | close(command, "to") |
11 | |
12 | # print "starting read loop" > "/dev/stderr" |
13 | do { |
14 | if (line) |
15 | print "got", line |
16 | # stopme(); |
17 | } while ((command |& getline line) > 0) |
18 | |
19 | # print "doing final close" > "/dev/stderr" |
20 | close(command) |
21 | } |
Note:
See TracBrowser
for help on using the repository browser.