manpagez: man pages & more
info gawk
Home | html | info | man

gawk: Input Exercises

 4.15 Exercises
   1. Using the 'FIELDWIDTHS' variable (⇒Constant Size), write a
      program to read election data, where each record represents one
      voter's votes.  Come up with a way to define which columns are
      associated with each ballot item, and print the total votes,
      including abstentions, for each item.
   2. ⇒Plain Getline, presented a program to remove C-style
      comments ('/* ... */') from the input.  That program does not work
      if one comment ends on one line and another one starts later on the
      same line.  That can be fixed by making one simple change.  What is
© 2000-2018
Individual documents may contain additional copyright information.