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

  Unix/Linux 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 Linux or Unix Question    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 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 Unix and Linux 07-05-2009
fpmurphy's Unix or Linux Image
fpmurphy fpmurphy is offline Forum Staff  
who?
 
Join Date: Dec 2003
Last Activity: 28 February 2015, 10:37 AM EST
Location: /dev/ph
Posts: 4,890
Thanks: 68
Thanked 445 Times in 413 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 Unix and Linux 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 Unix or Linux Image)
Sponsored Links
Closed Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Unix or Linux Image 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 03:08 AM
VMDB Failure" followed by "Unable to open snapshot file" s_linux SuSE 0 02-10-2009 12:01 PM
How to cut a file using " ", but fields can be separated with more than one " " shira Shell Programming and Scripting 12 01-26-2009 04:45 PM
let curl output to stdout AND save to a file scarfake Shell Programming and Scripting 3 05-31-2008 05:16 PM
Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`" Lokesha UNIX for Dummies Questions & Answers 4 12-20-2007 01:52 AM



All times are GMT -4. The time now is 08:45 AM.