PDA

View Full Version : mini-guide, obtain (shell) code (etc) from websites


jb_fvwm2
April 21st, 2009, 04:13
I needed an "expect" script I found online.
As usual, saving the web page made the script buried in tags.
or unavail

1... view source
2... save
3... consult sed-1-line guides for extracting line# -to - Line#
4... modify to use.

Sorry no time to be more verbose.

SirDice
April 21st, 2009, 07:45
Use perl and libwww:


perl -MLWP::Simple -e "getprint 'http://www.freebsd.org';"


http://search.cpan.org/~gaas/libwww-perl/lib/LWP/Simple.pm

jb_fvwm2
April 21st, 2009, 08:35
Noted, written down
to try sometime... the OP method is for when I am already at the webpage.

sed -n '231,264p' default.htm | tee -a expect.fil
is the sed command I used (I had saved "source" view as
expect.fil"

MG
May 10th, 2009, 10:13
lynx --dump <url>