The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
reading web page source in unix jaymzlee UNIX for Dummies Questions & Answers 3 03-26-2008 04:27 PM
Code page in Unix braindrain Shell Programming and Scripting 2 07-06-2006 08:18 AM
Want to show files on web page deepa20 Shell Programming and Scripting 3 02-07-2006 07:53 AM
source code of dbx.c Sacchi High Level Programming 0 04-07-2004 06:26 AM
multiple source code minion High Level Programming 2 11-12-2001 01:46 PM

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 12-25-2003
Registered User
 

Join Date: Oct 2003
Location: Rio de Janeiro - Brazil
Posts: 37
Which comand to show the source code on a web page?

Hi folks!

I am using MacOsX that runs freeBSD. Could you tell me what comand to type on the Unix Terminal to display on the terminal the source code of a certain web page?

I think something like

#<comand> http://www.apple.com

will display on the terminal's window the html source code of apple's page.

Thanks!


Bernardo Höhl -- Rio de Janeiro
Forum Sponsor
  #2  
Old 12-25-2003
Registered User
 

Join Date: Jul 2002
Location: new york
Posts: 1,025
if you have the utility 'wget' you can download pages that way, via the command line.
  #3  
Old 12-25-2003
Neo's Avatar
Neo Neo is offline
Administrator
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 4,493
Quote:
Originally posted by norsk hedensk
if you have the utility 'wget' you can download pages that way, via the command line.
WGET will not display a web page in a terminal window, it simply downloads the pages.

Quote:
GNU Wget is a free utility for non-interactive download of files from the
Web. It supports HTTP, HTTPS, and FTP protocols, as well as retrieval
through HTTP proxies.

Wget is non-interactive, meaning that it can work in the background, while
the user is not logged on. This allows you to start a retrieval and dis-
connect from the system, letting Wget finish the work. By contrast, most
of the Web browsers require constant user's presence, which can be a great
hindrance when transferring a lot of data.

Wget can follow links in HTML pages and create local versions of remote
web sites, fully recreating the directory structure of the original site.
This is sometimes referred to as ``recursive downloading.'' While doing
that, Wget respects the Robot Exclusion Standard (/robots.txt). Wget can
be instructed to convert the links in downloaded HTML files to the local
files for offline viewing.

Wget has been designed for robustness over slow or unstable network con-
nections; if a download fails due to a network problem, it will keep
retrying until the whole file has been retrieved. If the server supports
regetting, it will instruct the server to continue the download from where
it left off.
Neo
  #4  
Old 12-25-2003
Neo's Avatar
Neo Neo is offline
Administrator
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 4,493
Try Lynx

http://lynx.browser.org/

Quote:
Lynx is a text browser for the World Wide Web. Lynx 2.8.3 runs on Un*x, VMS, Windows 95/98/NT but not 3.1 or 3.11, on DOS (386 or higher) and OS/2 EMX. The current developmental version is also available for testing. Ports to Mac are in beta test.
Neo
  #5  
Old 12-25-2003
Registered User
 

Join Date: Jul 2002
Location: new york
Posts: 1,025
neo is right. i was thinking more along the lines of:
Code:
wget http://somepage.com/index.html && cat index.html
  #6  
Old 12-25-2003
Neo's Avatar
Neo Neo is offline
Administrator
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 4,493
Code:
wget http://somepage.com/index.html && cat index.html
....will display the HTML source of the page, not the actually page in text You still need a browser to convert the HTML to web-text if you want to see the actually text.

Then again, maybe the original poster really only wants to see the source.....

Neo
  #7  
Old 12-25-2003
Registered User
 

Join Date: Jul 2002
Location: new york
Posts: 1,025
haha yeah
Quote:
to display on the terminal the source code of a certain web page?
thats what i thought
Google The UNIX and Linux Forums
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 08:57 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0