#==================================== #Exercise #2 sample Answer weather.sh #==================================== # #Student Name: Ben Dover #Algonquin EMail Address: abcd0001 #Student Number: 074-210-779 #Course Number: DAT2330 #Lab Section Number: 014 #Professor Name: Ian Allen #Assignment Name/Number/Date: Exercise #2 due February 3, 2004 #Comment: number two of two files # Note the need to quote the URL because of the shell metacharacter. # You may use a backslash to hide the newline from the shell, so that # the long line can be written more readably as two lines. # lynx -dump 'http://weatheroffice.ec.gc.ca/forecast/city_e.html?YOW' \ | grep 'Temp.:' # Bonus Version: # Translate spans of blanks to one blank. # Delete the ugly punctuation characters. # lynx -dump 'http://weatheroffice.ec.gc.ca/forecast/city_e.html?YOW' \ | grep 'Temp.:' | tr -s ' ' | tr -d ':.'