Save cURL verbose output to file or do it like browser "save as.."


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Save cURL verbose output to file or do it like browser "save as.."
# 1  
Old 01-23-2010
Save cURL verbose output to file or do it like browser "save as.."

hi there !

i have exactly the same problem like this guy here

https://www.unix.com/shell-programmin...bose-file.html

i am not able to save the curl verbose output..


the sollution in this thread (redirecting stderr to a file) does not work for me.

iam wondering why i get stucked with such an simple problem.. iam hoping that there is a simple sollution i didn' get yet


when iam firing my curl command curl says
Code:
[1] 3319
[2] 3320
[3] 3321

then i got my prompt back and one second or so it writes things like this to console:

Code:
*   Trying 255.255.255.255... connected
* Connected to www.foo.bar (255.255.255.255) port 80 (#0)
> POST /exec/bar.php?id=112234 HTTP/1.1
...

this is what i want to save!


iam trying to save the output because the server responds with a "application/octet-stream" (downloading a file)

and curl puts the binary stuff on the screen like
Code:
��3]�…��^����9�x=p���&��������6-O���2'j@�(�8��:�h�kL���MI�AH�>#���dȐ�)�߲V�,�̽���؛AU1�����yى���A�\��1�Gyv74.F�4�̔ϥIͫ����;�(��G�_ӄ���%:i}V{>�E�y��vY�Ԡ��{"6�`ͺ�؏�⛽�Q5q�_��:h����

i did not find a way, to save this output to file file like common browser does with "save as.."

it would be great if someone is able to help ! it took a long time for me to figure out how the POST should be llok like to get a right response.. i was happy when it works and then "okay, last thing.. save it to a file" .. ^^

---------- Post updated at 04:49 PM ---------- Previous update was at 07:44 AM ----------

well, after trying it again the "-o" parameter worked perfectly !

i don't know why it does not worked this morning !

Last edited by pludi; 01-23-2010 at 09:08 AM.. Reason: inappropriate language
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

2. Shell Programming and Scripting

Save value from output of Corestat and save in a list for each core

I am trying to modify the "corestat v1.1" code which is in Perl.The typical output of this code is below: Core Utilization CoreId %Usr %Sys %Total ------ ----- ----- ------ 5 4.91 0.01 4.92 6 0.06 ... (0 Replies)
Discussion started by: Zam_1234
0 Replies

3. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

4. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

5. UNIX for Dummies Questions & Answers

Using cURL to save online search results

Hi, I'm attacking this from ignorance because I am not sure how to even ask the question. Here is the mission: I have a list of about 4,000 telephone numbers for past customers. I need to determine how many of these customers are still in business. Obviously, I could call all the numbers.... (0 Replies)
Discussion started by: jccbin
0 Replies

6. Shell Programming and Scripting

"Join" or "Merge" more than 2 files into single output based on common key (column)

Hi All, I have working (Perl) code to combine 2 input files into a single output file using the join function that works to a point, but has the following limitations: 1. I am restrained to 2 input files only. 2. Only the "matched" fields are written out to the "matched" output file and... (1 Reply)
Discussion started by: Katabatic
1 Replies

7. Shell Programming and Scripting

"Time" command and save result in a file.txt

Hi, I'am using "time" to check execution time of some script. Is there any possibility to save time command result into a file ? (2 Replies)
Discussion started by: Physix
2 Replies

8. Shell Programming and Scripting

Getting cURL to output verbose to a file

This is about to drive me crazy. What I want to do is simple: output ALL the verbose information from curl to a file I have read the manual, tried several options and searched this forum but no salvation... I'm using curl -k -Q "command" --user user:passwd --ftp-pasv --ftp-ssl -v... (1 Reply)
Discussion started by: caramandi
1 Replies

9. Shell Programming and Scripting

let curl output to stdout AND save to a file

hello hackers. i have a curl process running as cgi directly pushing stdout to the client. but i want to additionally save that stream to a file at the same time. any directions madly welcome. thanks in advance (3 Replies)
Discussion started by: scarfake
3 Replies

10. Solaris

terminal output - save to file?

I have a window open on my ultra 10 - a terminal window connecting to a server. Is there any way I can log all output to this window to a log file on my ultra 10 ? (2 Replies)
Discussion started by: frustrated1
2 Replies
Login or Register to Ask a Question