CIT 052 Index > awk Exercise 1

awk Exercise 1

Do lab 3 on pages 187 and 188. For questions 1 through 9, figure out the correct awk commands and then copy those commands into a file called

For example, if you were asked to print the names for all people whose last contribution ended in the digit 5, you would have this awk command:

awk -F ':' '/5$/{print $1}'

and you would copy and paste that command into the file that you are creating.

Important! Please download the data file from this location. If you are already on the server, you may copy it to your home directory with this command:

cp ~linux199/cit052/ ~

The file is in UNIX file format and does not have trailing blanks at the end of some lines, as the file on the CD does.

The file for number 10 should be placed into a file named lastname_firstname_facts.awk.

When You Finish

When you finish, put all the files into a single .zip file and upload it to Moodle.