Hi,
Does anyone know how to make BASH provide a list of possible completions on the first tab, and then start cycling through the possibilites on the next tab?
Right now this is what I have in my .bashrc:
bind "set show-all-if-ambiguous on"
bind \\C-o:menu-complete
This allows... (0 Replies)
I have an alias already in my .bash_profile to download files using cUrl's -o (output to file, user provides the file name) option. I find I'm using it quite a bit, so I wanted to write a script to run "curl -o", taking the necessary inputs - file name and URL from which to download - and then... (3 Replies)
I'm running a curl command in bash, but the & in the middle causes the second half of the line to run in the background, here's what I'm trying to do:
lat="37.451"
lon="-122.18"
url="http://ws.geonames.org/findNearestAddress?lat=$lat&lng=$lon"
curl -s "$url"
I tried escaping the & with \&,... (4 Replies)
can anyone please help me with this?
i know paypal is a secure site, so a code like the below would be needed. but that's where i get stuck.
curl -s -K https://www.paypal.com
I need to be able to curl to paypal and download a list of latest purchases. i know there HAS to be a way to do... (0 Replies)
Hi,
I want to write a shell script to make sure all the instruction is executive in flow.
eg.
I want my shell script to run finish this two progress first:
./program input_file_1.txt > input_file_1.txt.out &
./program input_file_2.txt > input_file_2.txt.out &
After then, only run the... (1 Reply)
In my bash script I want to say "if argument 2 is anything except x, y or z, than echo this" (x y and z being words).
So my script looks like this:
if ]
then
echo "unrecognized input: $2"
fi
This usually works but than I also want to say "if argument 2 IS x, y, or z, but argument 4 is... (4 Replies)
Hi,
In the archives I found this:
And this works fine.
$if mode=vi
"\C-0-": digit-argument
TAB: menu-complete
"\e
But what I want is to reverse this. So I want that tab does reverse menu completion and shift tab does normal menu completion.
Can anyone help me with this? Thanks (0 Replies)
On RHEL5 from within both a shell (sh->bash) and a csh script curl fails with a "curl: (6) Couldn't resolve host 'application'" error.
This is the result whether run as a command at the shell and/or c-shell prompt and curl also fails with the same error when the scripts are "source'd" at the... (5 Replies)
Hello.
I have pick up a script from internet to track errors from curl command.
#!/bin/bash
#
URL_TO_TEST="http://www.xxxxxx.yyy"
MY_VAR=curl_init("$URL_TO_TEST") ;
curl_setopt($MY_VAR, CURLOPT_HEADER, 1);
curl_setopt($MY_VAR, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($MY_VAR,... (2 Replies)
Hello Experts ,
I have an use case which needed your help . I have been using google for 2 days buy couldn`t succed , i believe i can get the help here.
Here is my use case to run on bash shell
1. Access an URL -- in script , it will be mentioned as inputURL
2. Once i accessed the URL... (1 Reply)
Discussion started by: radha254
1 Replies
LEARN ABOUT MOJAVE
curlopt_cookie
CURLOPT_COOKIE(3) curl_easy_setopt options CURLOPT_COOKIE(3)NAME
CURLOPT_COOKIE - set contents of HTTP Cookie header
SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_COOKIE, char *cookie);
DESCRIPTION
Pass a pointer to a zero terminated string as parameter. It will be used to set a cookie in the HTTP request. The format of the string
should be NAME=CONTENTS, where NAME is the cookie name and CONTENTS is what the cookie should contain.
If you need to set multiple cookies, set them all using a single option concatenated like this: "name1=content1; name2=content2;" etc.
This option sets the cookie header explicitly in the outgoing request(s). If multiple requests are done due to authentication, followed
redirections or similar, they will all get this cookie passed on.
The cookies set by this option are separate from the internal cookie storage held by the cookie engine and will not be modified by it. If
you enable the cookie engine and either you've imported a cookie of the same name (e.g. 'foo') or the server has set one, it will have no
effect on the cookies you set here. A request to the server will send both the 'foo' held by the cookie engine and the 'foo' held by this
option. To set a cookie that is instead held by the cookie engine and can be modified by the server use CURLOPT_COOKIELIST(3).
Using this option multiple times will only make the latest string override the previous ones.
This option will not enable the cookie engine. Use CURLOPT_COOKIEFILE(3) or CURLOPT_COOKIEJAR(3) to enable parsing and sending cookies
automatically.
The application does not have to keep the string around after setting this option.
DEFAULT
NULL, no cookies
PROTOCOLS
HTTP
EXAMPLE
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
curl_easy_setopt(curl, CURLOPT_COOKIE, "tool=curl; fun=yes;");
curl_easy_perform(curl);
}
AVAILABILITY
If HTTP is enabled
RETURN VALUE
Returns CURLE_OK if HTTP is enabled, CURLE_UNKNOWN_OPTION if not, or CURLE_OUT_OF_MEMORY if there was insufficient heap space.
SEE ALSO CURLOPT_COOKIEFILE(3), CURLOPT_COOKIEJAR(3), CURLOPT_COOKIELIST(3), CURLOPT_HTTPHEADER(3),
libcurl 7.54.0 December 21, 2016 CURLOPT_COOKIE(3)