home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / tos / gawk / gawk213b.zoo / test / argarray.awk < prev    next >
Encoding:
AWK Script  |  1991-04-06  |  365 b   |  12 lines

  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.     print "but this would change if we would have something to process"
  11. }
  12.