----------------------- Lab #06 for NET2003 due March 4, 2008 (Week 8) ----------------------- Remember - knowing how to find out an answer is more important than memorizing the answer. Learn to fish! RTFM! (Read The Fine Manual) Global weight: 5% of your total mark this term. Due date: before 14h00 (2pm) Tuesday March 4, 2008 (Week 8) The deliverables for this lab exercise are to be submitted online on the Course Linux Server using the "netsubmit" method described in the lab exercise description, below. No paper; no email; no FTP. Late-submission date: I will accept without penalty lab exercises that are submitted late but before 14h00 (2pm) on Wednesday, March 5. After that late-submission date, the lab exercise is worth zero marks. Lab exercises submitted by the *due date* will be marked online and your marks will be sent to you by email after the late-submission date. Lab Synopsis: Use scripting to data-mine a web site. Produce a new web page by extracting information from one or more other web pages, or from information available using other Linux commands. NOTE: For full marks, keep your lines shorter than 80 columns in this course. Short lines allow for easy printing and side-by-side comparison of files on a screen. Where to work: the Course Linux Server and/or your Ubuntu caddy Easy access to Course Notes: See previous labs. Part I - Ubuntu maintenance ------ * Make sure you have run the Update Manager and installed all current updates to your Ubuntu 7.10 (Gutsy) system. I've updated the Notes file installing_linux.txt file with a new section named "Select Software Sources", which is followed by "Install Ubuntu Software Updates". Follow those directions to get all the updates. * Make sure you have installed the Apache web server on your Ubuntu system. (See "Upgrades and Enhancements" in the Notes file: installing_linux.txt ) * Make sure you have configured your Ubuntu public_html directory for CGI scripting. Verify that you can use a web browser to execute a CGI script in your public_html directory on your Ubuntu caddy machine. (See a previous lab for how to enable this. See me if you have issues.) Part II - lab06script.sh - a shell script and CGI web file ------- 1. Create an executable shell script named lab06script.sh that uses shell script data mining to present some interesting data in a new way. The data you mine can come from other Internet sources (e.g. web pages, RSS feeds, etc.), or it can come from the Linux system that is running the CGI script (e.g. list of online users, file space usage, web page logs, etc.). You choose what data you want to present. 2. Your mark is based on demonstrated mastery of shell script commands and control structures. Trivial scripts earn trivial marks. 3. We will have a show-and-tell of all the completed scripts next week (Week 8). Please ensure that your data is suitable for public display. 4. You can develop the script on any system that supports shell scripts and CGI. Your script must work in your public_html directory on the Course Linux Server. If there are Linux commands that you need installed to make your script work, I can install them for you. 5. You can run your script at the shell prompt while you are debugging it. It is easier to see HTML mistakes at the shell prompt than it is trying to have your browser tell you what is wrong. Develop at the command line first, then run it as a CGI under the web browser. 6. I have posted simple and complex examples of data mining under the public_html directory of the "alleni99" account on the Course Linux Server and also in the Course Notes. You may use these examples to help you build your own data mining script. The Course Notes are full of examples of scripting, especially the Notes file data_mining.txt 7. Follow the script layout model used in previous executable scripts, including the use of comments in the script. Scripts without your added comments will not be marked. 8. Make sure the Content-type line and the blank line that follows are the first two lines of output of your CGI script, otherwise the script won't work as a CGI script. 9. Copy the working script to the public_html directory of your Course Linux Server account. Make the script executable and test it there. If there are any commands that you use in your script that are not installed on the Course Linux Server, let me know and I'll install them. Scripts without your added comments will not be marked. NOTE: For full marks, keep your lines shorter than 80 columns in this course! Submission ---------- Submission Standards: See Lab #1 for details. A. Make sure all submitted files contain an Exterior Assignment Submission label. For full marks, lines must be shorter than 80 columns. B. Submit your files for marking as Lab 06 using the following *single* netsubmit command line exactly as given here: $ netsubmit 06 lab06script.sh Always submit *all* files at the same time for every submission. Files submitted under the wrong names are worth zero marks. P.S. Did you spell all the assignment label fields and file names correctly?