Which comand to show the source code on a web page?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Which comand to show the source code on a web page?
# 1  
Old 12-25-2003
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
# 2  
Old 12-25-2003
if you have the utility 'wget' you can download pages that way, via the command line.
# 3  
Old 12-25-2003
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
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
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
Code:
wget http://somepage.com/index.html && cat index.html

....will display the HTML source of the page, not the actually page in text Smilie 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
haha yeah
Quote:
to display on the terminal the source code of a certain web page?
thats what i thought Smilie
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Execute command and show result in web page

Hi everyone, I have two question 1- I want to execute command in shell and after execution result show in a web server. (kind of making UI ) e.g. in shell root ~: show list item1 item2 item(n)in web server in a page draw a table and show those items in itno | name... (1 Reply)
Discussion started by: indeed_1
1 Replies

2. Shell Programming and Scripting

Dump web page source as rendered by browser

Hi guys| I need to retrieve a specific .m3u8 link from a web page, which makes use of iframes and JavaScript I tried to get the full source with "wget", "lynx", "w3m" and "phantomjs", but they can't dump all the source, with the part containing the link that i need, which seems to be inside... (0 Replies)
Discussion started by: Marmz
0 Replies

3. Shell Programming and Scripting

remove large portion of web page code between two tags

Hi everybody, I am trying to remove bunch of lines from web pages between two tags: one is <h1> and the other is <table it looks like <h1>Anniversary cards roses</h1> many lines here <table summary="Free anniversary greeting cards." cellspacing="8" cellpadding="8" width="70%">my goal... (5 Replies)
Discussion started by: georgi58
5 Replies

4. Shell Programming and Scripting

Performing extractions on web source page

I have downloaded a web source page to a file. I then egrep a single word to extract a line containing it to another file. I then cat the second file and remove everything before a word and after a second word to capture the phrase desired. This did not work. I used vi to validate that the 2... (1 Reply)
Discussion started by: slak0
1 Replies

5. Shell Programming and Scripting

web page source cleanup

is it possible to pass webpages to remove all tag style information, but leave the tag... say I have <h1 style='font-size: xxx; color: xxxxxx'>headline 1</h1> i want to get <h1>headline 1</h1> BTW, i got an oneliner here to remove all tags: sed -n '/^$/!{s/<*>//g;p; Thanks a... (4 Replies)
Discussion started by: dtdt
4 Replies

6. Shell Programming and Scripting

Getting source code of a page

I want to download a particular page from the internet and get the source code of the page in html format. I want to parse the source code to find a specific parameters using grep command. could someone tell me the linux command to download a specific page and parse the source code of it. ... (1 Reply)
Discussion started by: ahamed
1 Replies

7. Programming

Need simple web browser source code

Hello dear...i'm need web browser source code just the simple web browser..for my development site porn detected..thanks,,, (3 Replies)
Discussion started by: demhyt
3 Replies

8. UNIX for Dummies Questions & Answers

reading web page source in unix

is there a command that allows you to take a url and grab the source code from the page and output it to stdout? i want to know because i want to grab a page and pass it thru another program to analyze the page. any help would be appreciated thanks (3 Replies)
Discussion started by: jaymzlee
3 Replies

9. Shell Programming and Scripting

Want to show files on web page

hello Unix guru i want to show performance results on my internal website . We are manitaing the site through Wiki . I have to add new page in that . can someone help me to write shell script for that .. i want to display files datewise . my files names are starting with date . if... (3 Replies)
Discussion started by: deepa20
3 Replies
Login or Register to Ask a Question