1 # Ben Myers <0003571400@mcimail.com>
3 # Sum up sizes of OBJ files in current directory
4 # A clumsy script to count OBJs and sum up their sizes
6 # bmawk -fobjsize.awk workfile
7 # or similar command syntax with your awk program
8 # where workfile is a work file
10 # redirection done by shelled command
11 system("dir *.obj >" ARGV[1])
12 osize = 0 # size accumulator
13 ocount = 0 # obj counter
15 # Now read workfile back, skipping lines that are not files
16 $2 == "OBJ" { osize += $3 ; ocount++ }
18 print ocount " OBJs, total size " osize " bytes"