Debian Codegraph @

msdos/examples/shell.awk

raw
1 # Ben Myers <[email protected]>
2
3 # Test pipes under DOS. comment/uncomment print statements below
4 BEGIN {
5 # redirection done by shelled command
6 system("dir *.* /b >pippo.")
7 lcount = 0
8 }
9 {
10 # print
11 # Below is redirection done by mawk
12 # print >"pippo2."
13 print $0 | "sort"
14 lcount++
15 }
16 END { print "mawk NR line count=" NR " our line count=" lcount " lines in pippo"}