Sponsored Content
Full Discussion: Curl command
Top Forums Shell Programming and Scripting Curl command Post 302940781 by rakeshtomar82 on Thursday 9th of April 2015 03:18:30 AM
Old 04-09-2015
Curl command

Hi All,

I am using below curl commad and getting output data correctly

Code:
curl -k -u AASSDD:PPOOII -d "output_mode=csv" --data-urlencode search='search source=*/AASSDDFF/PPOOLLKK**/94.0*ASD-RST* "Caused by" OR "Error: LISTENER WILL BE DISABLED" OR java.lang.reflect.InvocationTargetException | table host, source' -d 'max_count=1' -d 'earliest_time=-8h' -d 'latest_time=now' https://rst.cbs.com:0308/servicesNS/...ch/jobs/export

but i want to use the “\” to extend the code for curl over multiple lines. Put each string that we are searching for on its own line.
like

Code:
curl -k -u AASSDD:PPOOII -d "output_mode=csv" --data-urlencode search='search source=*/AASSDDFF/PPOOLLKK**/94.0*ASD-RST* 
"Caused by" OR \
"Error: LISTENER WILL BE DISABLED" OR \ 
java.lang.reflect.InvocationTargetException \
| table host, source' -d 'max_count=1' -d 'earliest_time=-8h' -d 'latest_time=now' https://rst.cbs.com:0308/servicesNS/...ch/jobs/export

but i am not getting any data from this one.

pls help.

Last edited by Don Cragun; 04-09-2015 at 04:49 AM.. Reason: Add CODE tags; drop FONT and COLOR tags.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Curl command

Hello, I try to take out of the command curl the info of the time... time curl --write \"Downloaded %{time total}\" -o ...... but having some problem. (1 Reply)
Discussion started by: protocomm
1 Replies

2. UNIX for Dummies Questions & Answers

curl command with web pages

I can't quite seem to understand what the curl command does with a web address. I tried this: curl O'Reilly Media: Tech Books, Conferences, Courses, News but I just got the first few lines of a web page, and it's nowhere on my machine. Can someone elaborate? (2 Replies)
Discussion started by: Straitsfan
2 Replies

3. Shell Programming and Scripting

Authentication using Curl command

Hi, I am using linux curl command to login to the website. Website is using http protocol. My question is how to protect "username and password" while posting the data to the website to avoid man in the middle attack. Is posting the sensitive data(password) using curl is secure?. Is digest... (6 Replies)
Discussion started by: Anjan1
6 Replies

4. Shell Programming and Scripting

Is curl command secure

Can any one confirm that posting username and password using curl command to "https" site is secure or not. Thanks, (1 Reply)
Discussion started by: Anjan1
1 Replies

5. HP-UX

CURL command in HPUX

Hi, I do not find curl command in HPUX. I used to use curl command in solaris to download files onto the server using the below command. /opt/boksm/lib/curl http://mymachine.net:9191/faci/TSDM\$dm-orbeon/artifact/my-ear.zip -o my-ear.zip If not curl how can the same be achived... (4 Replies)
Discussion started by: mohtashims
4 Replies

6. Shell Programming and Scripting

Help with curl command

HI I am trying to write a script where i can enter a dvd's bar code at the cli and return the price sites will pay for the dvd. the bard code im using for testing is this site is through use of httpfox i have found some info whic i need to use with curl ctl00$ScriptManager1... (4 Replies)
Discussion started by: dunryc
4 Replies

7. Shell Programming and Scripting

Curl command to post headers

I am trying post SOAP header from file to curl command. The curl command is curl -vk -H "$(cat curl-test1.txt)" -X POST https://xvcfvusdgfsd.sdfjd.gf/cmsws/CMSService The contet of curl file is POST: https://cmsuat.chrysler.com/cmsusws/CMSService HTTP/1.1 SOAPAction:... (1 Reply)
Discussion started by: dineshaila
1 Replies

8. Shell Programming and Scripting

Alternative command/method to curl

is there a different way to do the following: curl -k -H "Content-Type:application/json" -X POST -d'{"api_token": "33blah526c-6bla71-441b-491b-0blahca08"}' https://10.10.10.10/api/1.4/auth/session -c /tmp/myhost01.myhost.com im seeking to use a different method because i'm running into TLS... (1 Reply)
Discussion started by: SkySmart
1 Replies

9. Shell Programming and Scripting

Using CURL command with special characters in URL

Hi. I 'm trying to hit a REST api and retrieve a JSON feed, and the URL has special characters in it. Something like: Example Domain The below curl command is failing curl -X GET https://www.example.com/?sample=name&id=1001 saying bad command at id=1001 I am going to use this as part... (3 Replies)
Discussion started by: kumarjt
3 Replies

10. Web Development

Curl Command Error

Good afternnon. I need your help please to understand the basics of curl command to test web services. Ive heard i can test a web service using this command,so: curl http://glb_osb_fs.nh.inet:7110/serverglobal/services/StrategicPlanning/NotifyMNPAction_v1 it yields some errors, i would... (5 Replies)
Discussion started by: alexcol
5 Replies
CURLOPT_REFERER(3)					     curl_easy_setopt options						CURLOPT_REFERER(3)

NAME
CURLOPT_REFERER - set the HTTP referer header SYNOPSIS
#include <curl/curl.h> CURLcode curl_easy_setopt(CURL *handle, CURLOPT_REFERER, char *where); DESCRIPTION
Pass a pointer to a zero terminated string as parameter. It will be used to set the Referer: header in the http request sent to the remote server. This can be used to fool servers or scripts. You can also set any custom header with CURLOPT_HTTPHEADER(3). The application does not have to keep the string around after setting this option. DEFAULT
NULL PROTOCOLS
HTTP EXAMPLE
CURL *curl = curl_easy_init(); if(curl) { curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); /* tell it where we found the link to this place */ curl_easy_setopt(curl, CURLOPT_REFERER, "http://example.com/aboutme.html"); curl_easy_perform(curl); } AVAILABILITY
If built with HTTP support RETURN VALUE
Returns CURLE_OK if HTTP support is enabled, CURLE_UNKNOWN_OPTION if not, or CURLE_OUT_OF_MEMORY if there was insufficient heap space. SEE ALSO
CURLOPT_USERAGENT(3), CURLOPT_HTTPHEADER(3), libcurl 7.54.0 December 21, 2016 CURLOPT_REFERER(3)
All times are GMT -4. The time now is 12:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy