home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_300 / 333_02 / fs.awk < prev    next >
Text File  |  1989-04-22  |  298b  |  15 lines

  1.  
  2. #  This sample demonstrates the use of the enhanced FS variable to split
  3. #  records on more complicated input files.
  4.  
  5.  
  6. BEGIN        {
  7.         FS  = "[\t ]*(SSN|NAME|TEL):[\t ]*"
  8.         OFS = "\t"
  9.         }
  10.  
  11.         # $1 is empty for each record
  12.         {
  13.         printf "%-20.20s %10s %16s\n", $2, $3, $4
  14.         }
  15.