#I'm quite new to scripting and my boss has asked me to solve a simple problem and sadly, I can't figure out how to do it. Any help is appreciated.
:confused:
#The following is a small shell script and the output that it produces for google.com.
#!/bin/sh
whois $1 | grep "Name Server"... (5 Replies)
hi , i would like to parse some file with the fallowing data :
data data data "unwanted data" data data "unwanted data"
data data data data #unwanted data.
what i want it to have any coments between "" and after # to be erased using awk or/and sed.
has anyone an idea?
thanks. (3 Replies)
I'm having a problem with a sed script.
A programmer needs to change columns 942,943,944 to blank spaces only where it has the number 999 in every line.
I didn't have a copy of the data file to test with originally so made my own up with a bunch of x's and put 999 in columns 5-7. The sed... (1 Reply)
i have file in the following format
*RECORD*
*FIELD NO*
123456
*FIELD TX*
this is a sample entry
*FIELD SA*
See Also
*FIELD RF*
References
*FIELD CS*
Clinical Symptoms
*FIELD AV*
Allelic Variants
*FIELD EH*
Edit History
*RECORD*
*FIELD NO*
123456 (1 Reply)
I want to delete corrupt records from a file through awk or sed.
Can anyone help me with this
Thanks
Striker
Change subject to a descriptive one, ty. (1 Reply)
Hello
I want to convert my cron list into a csv
Can you please help me with sed ?
eg:
Convert
#06,21,36,51 * * 1,2 * (. ~/.profile ; timex /some/path/script -30 -15) >> /some/path/logfile2 2>&1
* * * * * (. ~/.profile ; timex /some/path/script2) > /some/path/logfile2
To:... (1 Reply)
Hello guys,
I guess you are fed up with sed command and parse questions, but after a while researching the forum, I could not get an answer to my doubt. I know it must be easy done with sed command, but unfortunately, I never get right syntax of this command
OK, this is what I have in my... (3 Replies)
I would like to parse two strings from lines in a file only when both strings appear on the same line. For example, if I have the following line:
string1 string2 string3 string4 string5 string6 string7 string8 string9
I would like the output to be:
string2: string7
Can someone give me... (5 Replies)
sorry I messed up the last post with too many mistakes and corrections so I closed it and opening a new one which should be clear to everyone .my apologies to the admins.
I am using sun solaris and Linux , what I want is SED to print any string (or output it to a file preferably) that does... (2 Replies)
Discussion started by: boncuk
2 Replies
LEARN ABOUT MOJAVE
curlopt_resolve
CURLOPT_RESOLVE(3) curl_easy_setopt options CURLOPT_RESOLVE(3)NAME
CURLOPT_RESOLVE - provide custom host name to IP address resolves
SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RESOLVE,
struct curl_slist *hosts);
DESCRIPTION
Pass a pointer to a linked list of strings with host name resolve information to use for requests with this handle. The linked list should
be a fully valid list of struct curl_slist structs properly filled in. Use curl_slist_append(3) to create the list and
curl_slist_free_all(3) to clean up an entire list.
Each single name resolve string should be written using the format HOST:PORT:ADDRESS where HOST is the name libcurl will try to resolve,
PORT is the port number of the service where libcurl wants to connect to the HOST and ADDRESS is the numerical IP address. If libcurl is
built to support IPv6, ADDRESS can of course be either IPv4 or IPv6 style addressing.
This option effectively pre-populates the DNS cache with entries for the host+port pair so redirects and everything that operations against
the HOST+PORT will instead use your provided ADDRESS. Addresses set with CURLOPT_RESOLVE(3) will not time-out from the DNS cache like ordi-
nary entries.
The provided ADDRESS set by this option will be used even if CURLOPT_IPRESOLVE(3) is set to make libcurl use another IP version.
Remove names from the DNS cache again, to stop providing these fake resolves, by including a string in the linked list that uses the format
"-HOST:PORT". The host name must be prefixed with a dash, and the host name and port number must exactly match what was already added pre-
viously.
DEFAULT
NULL
PROTOCOLS
All
EXAMPLE
CURL *curl;
struct curl_slist *host = NULL;
host = curl_slist_append(NULL, "example.com:80:127.0.0.1");
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_RESOLVE, host);
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
curl_easy_perform(curl);
/* always cleanup */
curl_easy_cleanup(curl);
}
curl_slist_free_all(host);
AVAILABILITY
Added in 7.21.3. Removal support added in 7.42.0.
RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
SEE ALSO CURLOPT_IPRESOLVE(3), CURLOPT_DNS_CACHE_TIMEOUT(3), CURLOPT_CONNECT_TO(3),
libcurl 7.54.0 May 17, 2016 CURLOPT_RESOLVE(3)