UNIX homework assignment (1) Obtain the file hw.tar using one of two different ways: (a) Go to the class233/PROG directory on the IGPP server. You can do this by logging into any of the Barnyard machines and then entering: cd ~class233/PROG This contains the file hw.tar. Copy this file into your own directory where you will have write permission. Extract its contents. (b) Go to http://igppweb.ucsd.edu/~shearer/SIO233/ Download the hw.tar.gz file. Uncompress and untar it. You should obtain a directory called HW that contains: data.dir/ procdata* procdata.log do.proc* procdata.f90 do.proc runs the example shown in the notes (AN EXAMPLE OF A UNIX SCRIPT TO PROCESS DATA). Change this script so that the numbers in the file are multiplied by 3, each line in the output file starts with "xx" before the output number, and the output file names end in ".proc3" and e-mail me a copy of this modified script. Note: The executable program file, procdata, will not run on older Macs or PCs. In this case, you can run it on one of the Barnyard macs (login remotely if you want) or recompile the Fortran90 source code on your local machine by entering: gfortran procdata.f90 -o procdata assuming in this case your Fortran90 compiler is called gfortran. Since we have not discussed Fortran yet in class, this latter option may be difficult, so don't waste a lot of time trying to get it to work--just run the program on a Barnyard computer. Hint: Look at the sed and awk examples in my notes. (2) Get a table of recent southern California earthquakes off the web at www.scecdc.scec.org/recenteqs/ and then click on "all earthquakes" under Earthquake lists. Cut and paste this table into a plain text file using your favorite text editor. Remove any header information at the top, so that the first line is for one of the quakes. Use the UNIX sort command to sort this file in decreasing order of earthquake magnitude (The magnitude is in the 2nd column of this table). Mail me the first 10 lines of this sorted file (which should contain the 10 largest events). Hint: Look up the sort command and the -k option in my notes.