# mini-guide, obtain (shell) code (etc) from websites



## jb_fvwm2 (Apr 21, 2009)

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 (Apr 21, 2009)

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 (Apr 21, 2009)

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 10, 2009)

lynx --dump <url>


----------

