I'm trying to put together a basic script to get 'on demand' traffic info to my handheld, all commands more or less work as desired, but, I would like to make a 'proper script' out of it:
I guess I should put the 'temp' files in /var/tmp ? and, send screen output to /dev/null ? any help or suggestions appreciated: # ./traffic --09:34:15-- http://rta.nsw.gov.au/trafficreports/cameras/camera_images/citywestlink.jpg => `citywestlink.jpg' Resolving rta.nsw.gov.au... 163.189.7.150, 163.189.217.150 Connecting to rta.nsw.gov.au|163.189.7.150|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 22,125 (22K) [image/jpeg] 100%[====================================>] 22,125 --.--K/s 09:34:15 (2.38 MB/s) - `citywestlink.jpg' saved [22125/22125] Corrupt JPEG data: 736 extraneous bytes before marker 0xda ------------------------ #!/bin/sh lynx -dump http://rta.nsw.gov.au/trafficreports/sydney/sydney_east_inner_west.html | sed -n -e '/Last refreshed/{:a;N;/Road Works/!ba;p;}' > traf.rep wget http://rta.nsw.gov.au/trafficreports/cameras/camera_images/citywestlink.jpg jpegtran -rotate 270 < citywestlink.jpg > citymap.jpg mutt -s "Traffic Report East Inner West" -a citymap.jpg [EMAIL PROTECTED] < traf.rep rm traf.rep rm *.jpg --------------------- -- Voytek -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
