Advanced Exercises

 < Day Day Up > 

5.

Experiment with pgawk. What does it do? How can it be useful?

6.

Write a gawk program named net_list that reads from the cars file on www.sobell.com (see "Getting Input from a Network" on page 558) and displays a list of each of the cars' make, model, and price. Separate the output fields with TABs.

7.

Expand the net_list program developed in exercise 6 to use to_upper (page 557) as a coprocess to display the list of cars with only the make of the cars in uppercase. The model and subsequent fields on each line should appear as they do in the cars file.

8.

How can you get gawk to neatly format that is "pretty print" a gawk program file? (Hint: See the gawk man page.)

     < Day Day Up > 


    A Practical Guide to LinuxR Commands, Editors, and Shell Programming
    A Practical Guide to LinuxR Commands, Editors, and Shell Programming
    ISBN: 131478230
    EAN: N/A
    Year: 2005
    Pages: 213

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net