LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Display text of webpage from terminal (https://www.linuxquestions.org/questions/linux-newbie-8/display-text-of-webpage-from-terminal-475257/)

billamn 08-18-2006 08:48 PM

Display text of webpage from terminal
 
Is there a way to show the straight text or source of a web page from a terminal window?

e.g. From the shell $, I type: "print www.google.com/index.htm" to display the contents.

Centinul 08-18-2006 09:24 PM

If you want to view a webpage as text you could use lynx or links2. They are text based browsers. I don't know how to get the source from a terminal though. Hope this helps.

truthfatal 08-18-2006 09:32 PM

"lynx -source www.someurl.com" will dump the source code to the teminal. you could then >> it to a file or | it through less. for easier reading... I just checked the man page for links... "links -source www.url.org" works with that as well.

billamn 08-18-2006 09:45 PM

When I install it: "rpm -ivh lynx-2.8.5-11.i386.rpm"

I get the following error:

error: Failed dependencies:
libcrypto.so.4 is needed by lynx-2.8.5-11
libssl.so.4 is needed by lynx-2.8.5-11


But don't these depend on the following which I have on my system??:

openssl-0.9.6b-35.8
openssl-0.9.7a-5.1
openssl-devel-0.9.6b-35.8
openssl-0.9.7a-5.1

Tinkster 08-18-2006 09:58 PM

rpm is a bit daft in that respect (actually, rpm is daft,
full-stop :}); it wants EXACTLY the version that the package
was build against. Chances are you should go and find a lynx
that is meant for your distro & version.


Cheers,
Tink

billamn 08-18-2006 10:21 PM

Quote:

Originally Posted by Tinkster
rpm is a bit daft in that respect (actually, rpm is daft,
full-stop :}); it wants EXACTLY the version that the package
was build against. Chances are you should go and find a lynx
that is meant for your distro & version.


Cheers,
Tink

That worked! It installed but it didn't terminate gracefully:
Preparing... ########################################### [100%]
1:lynx ########################################### [100%]

It just sat there and I couldn't even ctrl-C break it. At least lynx is up and running now.

Thanks everyone.


All times are GMT -5. The time now is 12:25 AM.