Exercise #05 for DAT2330 due 2006-02-24 23:59 EDT (Friday) no late penalty if submitted by 2006-02-26 23:59 EDT (Sunday) GJ Hagenaars -- gj@hagenaars.com Work on the Course Linux Server (not ACADUNIX)! 1. Create a file called "exercise05answers.txt" 2. At the top of the file, use the label as defined before. 3. Put on a line the word "lab" by itself, then work on lab exercises 1-10 below. List all the relevant commands and arguments that you had to use in the lab exercises. Put in comments to show why you did something (this can help your mark even if you did something wrong). 2. Submit using the datsubmit command datsubmit 05 exercise05answers.txt lab exercises: 1. In my directory on the course linux server (my username is "gj"), is a directory called "public_html/dropbox". In this location, create a directory the name of which is your studentid. Set the permissions on this directory to only allow yourself all permissions (i.e. make sure that nobody else on the system can get into this directory). From here on, all lab exercises should take place in the directory you have just created (i.e. any new files you create have to go in there). 2. Create a file called "firstlast", the contents of which are the first and the last line of the password file. Do not use an editor. 3. Create a file called "firstmore", the contents of which are the contents of firstlast. Add to that the current date. 4. Use the command "wget" to retrieve weather information from here: http://text.weatheroffice.ec.gc.ca/forecast/textforecast_e.html?Bulletin=fpcn12.cwao&b_templatePrint=true and drop it into a file called "weatherforecast". You may want to look in a "normal" browser first, so that you have an idea of the information that you are getting. 5. Create a file "weathertable.txt" that starts with "Canadian urban forecasts issued 2006/02..." (so this is the first line), and the last line is the forecast for the last city on the web page. This file should not contain any HTML code. 6. Create a file called "ottawaweather.txt" that contains only the forecast for Ottawa. 7. How would you create "ottawaweather.txt" if you could not create temporary files, but had to parse the wget information immediately? 8. The extended forecast can be found at this URL http://text.weatheroffice.ec.gc.ca/forecast/textforecast_e.html?Bulletin=fpcn51.cwto&b_templatePrint=true Drop the web page into a file called "weatherlong". 9. Create a file "ottawaextended.txt" that contains the last paragraph of the weather information, without HTML code. What would happen if the order of the locations in this forecast would change? 10. (bonus) Are there new options to grep that would help pinpoint the Ottawa information? What command pipeline will work, regardless of the order of the locations in the forecast?