Sponsored Content
Full Discussion: Curl one liner
Top Forums UNIX for Advanced & Expert Users Curl one liner Post 302889351 by cutechaps on Thursday 20th of February 2014 05:08:46 AM
Old 02-20-2014
Network Curl one liner

Hi

I am trying to write a curl one-liner that will help me to input the password after intiating the upload. Also this curl job needs to run on the background and transfer the verbose output to a file. So we can tail the file and check the status if required.

This is curl command that I am using now.
Code:
curl -T "#filename#" -u "username" "https://URL/upload/" -o log.txt -v -k


Thanks

Last edited by Franklin52; 02-20-2014 at 06:19 AM.. Reason: Please use code tags for data and code samples
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

1 liner question

This works: nslookup `uname -n`|tail -2|awk -F: '{print $2}' This does not aa=`nslookup `uname -n`|tail -2|awk -F: '{print $2}'` Why??? Solaris v10 Thanks Brandt (6 Replies)
Discussion started by: beppler
6 Replies

2. UNIX for Advanced & Expert Users

one liner needed

Hi I have a file say (a.txt) which has following a.txt ---- $$var1=Tom $$var2=Kim I need a one liner which searches the file(a.txt) for $$var1 and returns the value in it(Tom). Thanks in advance Ammu (7 Replies)
Discussion started by: ammu
7 Replies

3. UNIX for Dummies Questions & Answers

awk one liner

I need a one liner to" find /pattern/ print from x lines before "pattern" to y lines after "pattern" (3 Replies)
Discussion started by: kenneth.mcbride
3 Replies

4. UNIX for Dummies Questions & Answers

need an awk one liner

example input file: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 (3 Replies)
Discussion started by: kenneth.mcbride
3 Replies

5. Shell Programming and Scripting

Need a one liner

abc/abc1/abc2/abc3/abc4 i need a script to pick this above path when ever any patterns like the below will be found. abc/abc1 abc/abc1/abc2 abc1/abc2/abc3 abc2/abc3/abc4 abc2/abc3/ etc .... etc..... not only the above 5 but like these one.. any one liner will be of great... (1 Reply)
Discussion started by: debu182
1 Replies

6. Shell Programming and Scripting

help one liner...

Hi I have a log data that shows chunks of data like this: thisis example test, this is example test, this is example test thisis example test, this is example test, this is example test thisis example test, this is example test, this is example test thisis example test, this is example test,... (2 Replies)
Discussion started by: erick_tuk
2 Replies

7. Shell Programming and Scripting

Search & Replace regex Perl one liner to AWK one liner

Thanks for giving your time and effort to answer questions and helping newbies like me understand awk. I have a huge file, millions of lines, so perl takes quite a bit of time, I'd like to convert these perl one liners to awk. Basically I'd like all lines with ISA sandwiched between... (9 Replies)
Discussion started by: verge
9 Replies

8. Shell Programming and Scripting

help with sed one liner

hey everyone, I want to remove some characters from a string that i have with sed. For example if my string is: a0=bus a1=car a2=truck I want my output to look like this: bus car truck So i want to delete the two characters before the = and including the =. This is what i came up with... (3 Replies)
Discussion started by: GmGeubt
3 Replies

9. UNIX for Dummies Questions & Answers

sed one-liner

I have a data base of part numbers: AAA Thing1 BBB Thing2 CCC Thing3 File one is a list of part numbers: AAA234 BBB678 CCC2345 Is there a sed one-line that would compare a data base with and replace the part numbers so that the output looks like this? AAA234 Thing1 BBB678 Thing2... (5 Replies)
Discussion started by: jimmyf
5 Replies

10. Shell Programming and Scripting

PERL one liner

hi, I am using PERL one liner for oracle database connection as : $PERL -e "use DBI; DBI->connect(qw(DBI:Oracle:SID user passwd));" is there a way to append select statement to this connection ? i.e. DB connection and select stmt in one line ? how to do sysdba connection using one lines... (1 Reply)
Discussion started by: talashil
1 Replies
CURLOPT_HTTPGET(3)					     curl_easy_setopt options						CURLOPT_HTTPGET(3)

NAME
CURLOPT_HTTPGET - ask for a HTTP GET request SYNOPSIS
#include <curl/curl.h> CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTPGET, long useget); DESCRIPTION
Pass a long. If useget is 1, this forces the HTTP request to get back to using GET. Usable if a POST, HEAD, PUT, etc has been used previ- ously using the same curl handle. When setting CURLOPT_HTTPGET(3) to 1, it will automatically set CURLOPT_NOBODY(3) to 0 and CURLOPT_UPLOAD(3) to 0. DEFAULT
0 PROTOCOLS
HTTP(S) EXAMPLE
curl = curl_easy_init(); if(curl) { curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); /* use a GET to fetch this */ curl_easy_setopt(curl, CURLOPT_HTTPGET, 1L); /* Perform the request */ curl_easy_perform(curl); } AVAILABILITY
Along with HTTP RETURN VALUE
Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not. SEE ALSO
CURLOPT_NOBODY(3), CURLOPT_UPLOAD(3), libcurl 7.54.0 February 03, 2016 CURLOPT_HTTPGET(3)
All times are GMT -4. The time now is 05:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy