Sponsored Content
Top Forums Shell Programming and Scripting Save cURL verbose output to file or do it like browser "save as.." Post 302389191 by crabmeat on Saturday 23rd of January 2010 04:49:56 PM
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
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
XMLCATALOG(1)							 xmlcatalog Manual						     XMLCATALOG(1)

NAME
xmlcatalog - Command line tool to parse and manipulate XML or SGML catalog files. SYNOPSIS
xmlcatalog [--shell | --create | --add type orig replace | --del values | --noout | --verbose] [catalogfile] [entities] INTRODUCTION
xmlcatalog is a command line application allowing users to monitor and manipulate XML and SGML catalogs. It is included in libxml2. Its functions can be invoked from a single command from the command line, or it can perform multiple functions in interactive mode. It can operate on both XML and SGML files. COMMAND LINE OPTIONS
--shell filename Run a shell allowing interactive queries on catalog file filename. --create filename Create a new XML catalog. Outputs to stdout, ignoring filename unless --noout is used, in which case it creates a new catalog file filename. --add 'type' 'orig' 'replace' filename Add an entry to catalog file filename. type indicates the type of entry. Possible types are 'public', 'system', 'rewriteSystem', 'delegatePublic', 'delegateSystem'amd 'rewriteURI'. 'orig' is the original reference to be replaced, and 'replace' is the URI of the replacement entity to be used. The --add option will not overwrite filename, outputing to stdout, unless --noout is used. The --add will always take three parameters even if some of the XML catalog constructs will have only a single argument. If the --add option is used following the --sgml option, only a single argument, a filename, is used. This is used to add the name of a catalog file to an SGML supercatalog, a file that contains references to other included SGML catalog files. --del 'values' filename Remove entries from the catalog file filename matching 'values'. The --del option will not overwrite filename, outputing to stdout, unless --noout is used. --noout Save output to the named file rather than outputing to stdout. --sgml Uses SGML Super catalogs for --add and --del options -v or --verbose output debugging information. SHELL COMMANDS
Invoking xmlcatalog with the --shell filename option opens a command line shell allowing interactive access to the catalog file identified by filename. Invoking the shell provides a command line prompt after which commands can be entered. public 'PublicID' Execute a public identifier lookup of the catalog entry for 'PublicID'. The corresponding entry will be output to the command line. system 'SystemID' Execute a public identifier lookup of the catalog entry for 'SystemID'. The corresponding entry will be output to the command line. add 'type' 'orig' 'replace' Add an entry to the catalog file. type indicates the type of entry. Possible types are 'public', 'system', 'rewriteSystem', 'dele- gatePublic' and 'delegateSystem'. 'orig' is the original reference to be replaced, and 'replace' is the URI of the replacement entity to be used. del 'values' Remove the catalog entry corresponding to 'values'. dump Print the current catalog. debug Print debugging statements showing the steps xmlcatalog is executing. quiet Stop printing debugging statements. exit Quit the shell. RETURN VALUES
xmlcatalog's return codes provide information that can be used when calling it from scripts. 0: normal 1: Failed to remove an entry from the catalog 2: Failed to save to the catalog, check file permissions 3: Failed to add an entry to the catalog 4: Failed to lookup and entry in the catalog REFERENCES
libxml web page: http://www.xmlsoft.org/ libxml catalog support web page:: http://www.xmlsoft.org/catalog.html James Clark's SGML catalog page:: http://www.jclark.com/sp/catalog.htm OASIS XML catalog specification: : http://www.oasis-open.org/committees/entity/spec.html AUTHOR
John Fleck. XMLCATALOG(1)
All times are GMT -4. The time now is 10:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy