curl: "save file as" | Unix Linux Forums | Shell Programming and Scripting

  Go Back    


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

curl: "save file as"

Shell Programming and Scripting


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 07-05-2009
creamcheese creamcheese is offline
Registered User
 
Join Date: Jul 2009
Last Activity: 9 April 2011, 6:52 AM EDT
Posts: 17
Thanks: 1
Thanked 0 Times in 0 Posts
curl: "save file as"

Hello,

I am having the following problem: I am downloading data from a web-server that is calculated with parameters supplied by a http post request.

When I use firefox, after submitting the data a window asks: "Save data as.....", is there an option with curl to automate this step and save the file into a directory.

So fare I use:


Code:
curl -d "y=1&x=3" http://www.xyz.com -o file1.txt

curl write the following at the end:


Code:
usage: write user [tty]

and the textfile contains one line:

Content-Type: text/plain

Any hints would be greatly appreciated!

Thanks in Advance
Sponsored Links
    #2  
Old 07-05-2009
fpmurphy's Avatar
fpmurphy fpmurphy is offline Forum Staff  
who?
 
Join Date: Dec 2003
Last Activity: 17 September 2014, 7:58 PM EDT
Location: /dev/ph
Posts: 4,805
Thanks: 63
Thanked 425 Times in 394 Posts
Get a web page and store in a local file:

curl -o page.html Example Web Page

Get a web page and store in a local file, make the local file get the name of the remote document:

curl -O Example Web Page
Sponsored Links
    #3  
Old 07-05-2009
creamcheese creamcheese is offline
Registered User
 
Join Date: Jul 2009
Last Activity: 9 April 2011, 6:52 AM EDT
Posts: 17
Thanks: 1
Thanked 0 Times in 0 Posts
thanks a lot it worked exactly like I was hoping )
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
"sed" to check file size & echo " " to destination file jockey007 Shell Programming and Scripting 7 04-28-2009 02:08 AM
VMDB Failure" followed by "Unable to open snapshot file" s_linux SuSE 0 02-10-2009 11:01 AM
How to cut a file using " ", but fields can be separated with more than one " " shira Shell Programming and Scripting 12 01-26-2009 03:45 PM
let curl output to stdout AND save to a file scarfake Shell Programming and Scripting 3 05-31-2008 04:16 PM
Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`" Lokesha UNIX for Dummies Questions & Answers 4 12-20-2007 12:52 AM



All times are GMT -4. The time now is 05:41 AM.