Sponsored Content
Top Forums Shell Programming and Scripting Getting cURL to output verbose to a file Post 302386585 by alister on Tuesday 12th of January 2010 08:48:00 PM
Old 01-12-2010
I don't use curl very often, but from the sounds of it, perhaps redirecting standard error instead of standard output may be what you're looking for. You can try:

Code:
curl <your curl options here> 2>stderr.log

Regards,
alister
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sftp verbose output

We need to use sftp to replace the ftp on all our application scripts. The command itself works, however,the output from the verbose is not giving us a success response with a transfer count. Our processes require that we interrogate the response to ensure the data transfer was successful. ... (2 Replies)
Discussion started by: MizzGail
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

script to output curl result as html

hi, new to scripting and would like to know how can I have a script which will curl a few URLs and have the results such as the URLs being curled, dns lookup time, connection time, total time, etc save in a html format in a form of table with column and rows. thank you. (4 Replies)
Discussion started by: squidusr
4 Replies

4. Shell Programming and Scripting

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-programming-scripting/127668-getting-curl-output-verbose-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.... (0 Replies)
Discussion started by: crabmeat
0 Replies

5. UNIX for Dummies Questions & Answers

Routing a verbose information to a log file

Hi All, In the script mentioned below uses a sftp command to login to the remote host and pull the files from the remote server. we want to log this inf to a log file . But it is not happening, the verbose information is just displayed on the screen but not to the log file when I run this... (1 Reply)
Discussion started by: raghuveer2008
1 Replies

6. Shell Programming and Scripting

ery weird wget/curl output - what should I do?

Hi, I'm trying to write a script to download RedHat's errata digest. It comes in a txt.gz format, and i can get it easily with firefox. HOWEVER: output is VERY strange when donwloading it in a script. It seems I'm getting a file of the same size - but partially text and partly binary! It... (5 Replies)
Discussion started by: jstilby
5 Replies

7. Shell Programming and Scripting

Encapsulating output of CURL and/or WGET

i use curl and wget quite often. i set up alarms on their output. for instance, i would run a "wget" on a url and then search for certain strings within the output given by the "wget". the problem is, i cant get the entire output or response of my wget/curl command to show up correctly in... (3 Replies)
Discussion started by: SkySmart
3 Replies

8. Shell Programming and Scripting

Filter output in curl

Hello guys, I'm writing a little script which sends me sms with my shell script via api of a sms provider. problem is I can't filter my curl output for this site: site url:... (1 Reply)
Discussion started by: genius90
1 Replies

9. Shell Programming and Scripting

Extracting urls from curl output

Hello. I use curl to fetch a website, then, I want to extract the URLs from this curls output. I tried both sed and grep, but couldnt figure it out. Ive tried : sed -n 's/href="\(*\).*/\1/p' results.txt and grep -o grep -o '<a href="http://*.*.*/*">' results.txt. What pattern... (6 Replies)
Discussion started by: jozo95
6 Replies

10. Web Development

Filename output in curl

How can I get the name of the default output filename from curl using the argument -O? Using -o one can choose a filename. I want to get the name of the original file, but don't understand how to get it. curl -o filename http://www.website.com curl -O http://www.website.com The... (3 Replies)
Discussion started by: locoroco
3 Replies
CURLOPT_VERBOSE(3)					     curl_easy_setopt options						CURLOPT_VERBOSE(3)

NAME
CURLOPT_VERBOSE - set verbose mode on/off SYNOPSIS
#include <curl/curl.h> CURLcode curl_easy_setopt(CURL *handle, CURLOPT_VERBOSE, long onoff); DESCRIPTION
Set the onoff parameter to 1 to make the library display a lot of verbose information about its operations on this handle. Very useful for libcurl and/or protocol debugging and understanding. The verbose information will be sent to stderr, or the stream set with CUR- LOPT_STDERR(3). You hardly ever want this set in production use, you will almost always want this when you debug/report problems. To also get all the protocol data sent and received, consider using the CURLOPT_DEBUGFUNCTION(3). DEFAULT
0, meaning disabled. PROTOCOLS
All EXAMPLE
CURL *curl = curl_easy_init(); if(curl) { curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); /* ask libcurl to show us the verbose output */ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); /* Perform the request */ curl_easy_perform(curl); } AVAILABILITY
Always RETURN VALUE
Returns CURLE_OK SEE ALSO
CURLOPT_STDERR(3), CURLOPT_DEBUGFUNCTION(3), libcurl 7.54.0 February 03, 2016 CURLOPT_VERBOSE(3)
All times are GMT -4. The time now is 09:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy