Possible to download web page's text to a file?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Possible to download web page's text to a file?
# 1  
Old 02-16-2011
Possible to download web page's text to a file?

Hi,

Say there is a web page that contains just text only - that is, even the source code is just the text itself, nothing more. An example would be "http://mynasadata.larc.nasa.gov/docs/ocean_percent.txt"

Is there a UNIX command that would allow me to download this text and store it in a file? I tried using wget which works for any normal web page but doesn't work for this one.

Thanks!
# 2  
Old 02-16-2011
Most Linux systems can do
Code:
wget "http://mynasadata.larc.nasa.gov/docs/ocean_percent.txt"

or
Code:
curl "http://mynasadata.larc.nasa.gov/docs/ocean_percent.txt" > ocean_percent.txt

curl is far more sophisticated, but wget is way easier to use.

If you don't have a linux system you may have to install one of these programs as third-party utilities. Once you discover them they're really too handy to do without Smilie
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Converting text file to html page

Hello Everyone, I have the following text file with the each field separated by newline Text file P file1-en-us_US-20170718T150157Z.json Wed 19 Jul 2017 06:10:13 AM EDT P file2-en-us_US-20170718T160150Z.json Wed 19 Jul 2017 06:10:13 AM EDT P file3-en-us_US-20170718T163218Z.json Wed... (9 Replies)
Discussion started by: nextStep
9 Replies

2. UNIX for Beginners Questions & Answers

How to use cURL to download web page with authentification (form)?

Hello, I'm new in the forum and really beginer, and also sorry form my bad english. I use linux and want to create little program to download automaticaly some pdf (invoices) and put in a folder of my computer. I learn how to do and programme with ubuntu but the program will be implemented... (1 Reply)
Discussion started by: MarcelOrMittal
1 Replies

3. Shell Programming and Scripting

Copy text from web page and add to file

I need help to make a script for Ubuntu to OSCam that copy the text on this website that only contains "C: ip port randomUSERNAME password" and want to exclude the text "C:" and replace the rest with the old in my test.server file. (line 22) device = ip,port (line 23) user =... (6 Replies)
Discussion started by: baxarn
6 Replies

4. Shell Programming and Scripting

Web page with picture, text, php function

Hello. I'm trying to create a web page which the presentation is as follows: 1 °) at the top of page an image 2 °) below the text 3 °) to complete a php function that returns information. I tried different things but none work. Script 1: <!DOCTYPE html> <html> <head> <style> div { ... (5 Replies)
Discussion started by: jcdole
5 Replies

5. Shell Programming and Scripting

Use curl to send a static xml file using url encoding to a web page using pos

Hi I am try to use curl to send a static xml file using url encoding to a web page using post. This has to go through a particular port on our firewall as well. This is my first exposure to curl and am not having much success, so any help you can supply, or point me in the right direction would be... (1 Reply)
Discussion started by: Paul Walker
1 Replies

6. UNIX for Dummies Questions & Answers

List and download web page files

Hello, Does anyone know of a way to list all files related to a single web page and then to download say 4 files at a time simultaneously until the entire web page has been downloaded successfully? I'm essentially trying to mimic a browser. Thanks. (2 Replies)
Discussion started by: shadyuk
2 Replies

7. Shell Programming and Scripting

Download dynamic generated image from HTML page

I've an HTML page where the pie chart is generated with google java code with the required input values in UNIX. The HMTL page is generated in UNIX and then when it loads in browser, the code is interpreted thought internet and the pie chart is generated. This is done by the java code in the... (4 Replies)
Discussion started by: Amutha
4 Replies

8. Shell Programming and Scripting

Grep text matching problem with script which checks if web page contains text.

I wrote a Bash script which checks to see if a text string exists on a web page and then sends me an email if it does (or does not e.g. "Out of stock"). I run it from my crontab, it's quite handy from time to time and I've been using it for a few years now. The script uses wget to download an... (6 Replies)
Discussion started by: gencon
6 Replies

9. Shell Programming and Scripting

Random web page download wget script

Hi, I've been attempting to create a script that downloads web pages at random intervals to mimic typical user usage. However I'm struggling to link $url to the URL list and thus wget complains of a missing URL. Any ideas? Thanks #!/bin/sh #URL List url1="http://www.bbc.co.uk"... (14 Replies)
Discussion started by: shadyuk
14 Replies

10. Shell Programming and Scripting

File to web page

Hi all, I am having an XML file. And as per requirement I need to map fields of this file with various field of web page. So how can I use wput command into it ? Regards, gander_ss (3 Replies)
Discussion started by: gander_ss
3 Replies
Login or Register to Ask a Question