source:
vendor/gawk/3.1.5/test/argarray.awk@
3076
| Last change on this file since 3076 was 3076, checked in by , 19 years ago | |
|---|---|
| File size: 385 bytes | |
| Line | |
|---|---|
| 1 | BEGIN { |
| 2 | argn = " argument" (ARGC > 1 ? "s" : "") |
| 3 | are = ARGC > 1 ? "are" : "is" |
| 4 | print "here we have " ARGC argn |
| 5 | print "which " are |
| 6 | for (x = 0; x < ARGC; x++) |
| 7 | print "\t", ARGV[x] |
| 8 | print "Environment variable TEST=" ENVIRON["TEST"] |
| 9 | print "and the current input file is called \"" FILENAME "\"" |
| 10 | } |
| 11 | |
| 12 | FNR == 1 { |
| 13 | print "in main loop, this input file is known as \"" FILENAME "\"" |
| 14 | } |
Note:
See TracBrowser
for help on using the repository browser.
