1 |
On Tue, 20 Sep 2005, Ow Mun Heng wrote: |
2 |
|
3 |
> Remember my script that sends out HTML emails? Well, that's done, but |
4 |
> it's in-efficient. |
5 |
> |
6 |
> The actual script that parses screen-scrapes. Initial script only went |
7 |
> to get the "Last Price" now, I would like to add the "Day Range" |
8 |
> |
9 |
> last_price() |
10 |
> { |
11 |
> value="$(lynx -dump "$url$symbol" | grep 'Last price:' | \ |
12 |
> awk -F: 'NF > 1 && $(NF) != "N/A" { print $(NF) }' )" |
13 |
> } |
14 |
> |
15 |
> day_range() |
16 |
> { |
17 |
> day_range="$(lynx -dump "$url$symbol" | grep 'Low \& High:' | \ |
18 |
> awk -F: 'NF > 1 && $(NF) != "N/A" { print $(NF) }' )" |
19 |
> } |
20 |
> |
21 |
> The above is in-efficient because I need to call the script to get the |
22 |
> page 2 times. |
23 |
|
24 |
Err... what were you saying about perl being hard...? |
25 |
|
26 |
(At some point, your shell script will become so convoluted that perl |
27 |
or python will look easy ;-) |
28 |
|
29 |
|
30 |
-- |
31 |
|
32 |
-- |
33 |
gentoo-user@g.o mailing list |