From: | Billy Holmes <billy@××××××.net> | ||
---|---|---|---|
To: | gentoo-user@l.g.o | ||
Subject: | Re: [gentoo-user] Bash + Awk + variable assignation. | ||
Date: | Tue, 20 Sep 2005 18:19:48 | ||
Message-Id: | 4330519F.6040403@gonoph.net | ||
In Reply to: | Re: [gentoo-user] Bash + Awk + variable assignation. by "A. Khattri" |
1 | A. Khattri wrote: |
2 | |
3 | > Err... what were you saying about perl being hard...? |
4 | |
5 | You can add other error checking, but here's the jist of it in perl |
6 | |
7 | escaped for usage in a shell |
8 | |
9 | perl -e " |
10 | map { |
11 | s/^[ \t]*//; |
12 | printf \"Last: %s\\n\", (split(/:/,\$_))[1] if /Last Price/; |
13 | printf \"L/H : %s\\n\", (split(/:/,\$_))[1] if /Low \\& High/; |
14 | } split(/\n/,\`lynx -dump $url$symbol\`); |
15 | " |
16 | -- |
17 | gentoo-user@g.o mailing list |