On Tue, 20 Sep 2005, Ow Mun Heng wrote:

> Remember my script that sends out HTML emails? Well, that's done, but
> it's in-efficient.
>
> The actual script that parses screen-scrapes. Initial script only went
> to get the "Last Price" now, I would like to add the "Day Range"
>
> last_price()
> {
> value="$(lynx -dump "$url$symbol" | grep 'Last price:' | \
>         awk -F: 'NF > 1 && $(NF) != "N/A" { print $(NF) }' )"
> }
>
> day_range()
> {
> day_range="$(lynx -dump "$url$symbol" | grep 'Low \& High:' | \
>         awk -F: 'NF > 1 && $(NF) != "N/A" { print $(NF) }' )"
> }
>
> The above is in-efficient because I need to call the script to get the
> page 2 times.

Err... what were you saying about perl being hard...?

(At some point, your shell script will become so convoluted that perl
or python will look easy ;-)


-- 

-- 
[email protected] mailing list

Reply via email to