CIT052 Index > grep Exercise 1

grep Exercise 1

Obtain the file grepdata.txt. You can save the file on your local system, then upload it to your home directory with FTP, or, from the command line:

cp ~linux199/grepdata.txt ~  # copies to your home directory

Once you have the file, write a series of grep statements that do the following:

Write grep statements that use command-line options along with the pattern to do the following:

Save these statements in a file named in the form

and email it to me. So, for example, if your name is Joe Doakes, your file would be named

Your patterns should work in any generic file of this sort. They should not be dependent upon the data in this particular file; if I add more lines of the same form to the file, your patterns should still work.