BD350 HW 3a

Shell Scripting

Due: 2006 Oct 30, beginning of class

Name: _________________________________________

Score:  _____ / 30 = _____ / 100

Linux Shell Scripting

 

This assignment is to be done on your class Linux server.  Make sure all output is formatted nicely and neatly.    I will be grading all your assignments by logging in with my account and invoking my root (administrator) status.  Thus, there is not anything you need to submit to me in order for me to grade your assignment.  You simply do the work in your account on the machine, and I will grade it there.  Be sure to complete your work before the start of class on the due date.  Any files updated after the start of class on the due date will not be given credit.  (Only work available for me to grade on this machine in your assigned account will be given credit.) 

 

You should use basic bash shell scripting, and NOT rely on or use awk, perl, etc.  Use commands we have discussed in class and that are in the class slides.  If you have an interest in using other tools, get approval from the teacher beforehand.

                                   

1.   I have a server process running on my linux instance (10.10.103.250) on port 55555 that serves a tar.gz file containing eBay auction data.  Write a shell script to connect to this server process and download the file.  Unpack it.  There should be two files "summary.data" and "bid.data". Using ALL the auctions in the summary.data file (and the associated bid records in the bid.data file), compute the average, minimum and maximum "snipe" time (time between the end of the auction and the last bid.  Using a script called 11-snipe, run the above and the output should look like this:

    This data set consisted of 1005 auctions.
    Snipe: Average = 43.4s   Minimum = 1s   Maximum = 43m 35s

Possible new tools:  "netcat", "read", "bc"