08-19-2019
Hi Neo,
I didn't know about that - thanks! It looks like this will be useful.
Cheers.
8 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi
I am trying to set up two hosts in a reverse proxy. The reverse proxy already has 8 servers running perfectly, but they are all simply mapping pure addresses, which I have registered internally and externally.
The latest two I wish to add are a bit different, they are app servers, one... (1 Reply)
Discussion started by: rboekdrukker
1 Replies
2. Shell Programming and Scripting
Hi,
I am trying to upload a file to a SQL database table. The column type is IMAGE. I am looking for a solution to upload a word doc file. I tried 3 approaches.
1) my $fileToStore = "mytest.doc";
open IPFILE, "<", $name;
binmode IPFILE;
while (<IPFILE>)
{
$fileToStore .= $_;
}
close... (1 Reply)
Discussion started by: b.paramanatti
1 Replies
3. Shell Programming and Scripting
hi all
I am new to unix and want to create a loop to repeat the loop and before that it ask me to do so.I know "while" may help but I put it in my work and getting stuk with it.any help appreciated. (13 Replies)
Discussion started by: samsami1971
13 Replies
4. UNIX and Linux Applications
Hello,
I am using Curl command to make a function call to a web service. The issue I am facing right now is:
curl h**p://www.google.com
with the above command, I get a XML file as a response. Also when i execute :
wget h**p://www.google.com
Replace ** : tt
I can see status as... (1 Reply)
Discussion started by: amitshete
1 Replies
5. Shell Programming and Scripting
hello folks,
i am stuck with this awk command. i need to calculate the sum of a column of values on a flatfile and i am using the following command :
awk -F"|" '{x += $10} END {print "Sum: "x}' standard_csv_file1.out
that flatfile contains 180 fields and i am getting the... (5 Replies)
Discussion started by: jdsony
5 Replies
6. UNIX for Dummies Questions & Answers
Hi ,
i have a shell script with the first two lines as
#! /bin/ksh
set -x
when i try opening the file from unix using the command 'sh filename.sh' , i am getting the below error :
invalid optionline 2: set: -
Pls help
Use code tags for you code and data... (1 Reply)
Discussion started by: Rajankum
1 Replies
7. Shell Programming and Scripting
Hello,
Can somone help with this command please?
I have this output pattern in a file. I use a simple awk command to
print each field separated by comma. For example I use this to get the first
awk -F, "{ print $1 }"
"ABC=abcdefg,CDF=mnqrst,GGG=hrvyess"
issue:
What I... (7 Replies)
Discussion started by: mnassiri
7 Replies
8. Programming
I have thrown in the towel and cant figure out how to do this. I have a directory of html files that contain urls that I need to scrape (loop through) and add into a dictionary. An example of the output I would like is:
bigbadwolf.htlm: https://www.blah.com, http://www.blahblah.com,... (5 Replies)
Discussion started by: metallica1973
5 Replies
LEARN ABOUT MOJAVE
curlinfo_local_port
CURLINFO_LOCAL_PORT(3) curl_easy_getinfo options CURLINFO_LOCAL_PORT(3)
NAME
CURLINFO_LOCAL_PORT - get the latest local port number
SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_LOCAL_PORT, long *portp);
DESCRIPTION
Pass a pointer to a long to receive the local port number of the most recent connection done with this curl handle.
PROTOCOLS
All
EXAMPLE
{
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/");
res = curl_easy_perform(curl);
if(CURLE_OK == res) {
long port;
res = curl_easy_getinfo(curl, CURLINFO_LOCAL_PORT, &port);
if(CURLE_OK == res) {
printf("We used local port: %ld
", port);
}
}
curl_easy_cleanup(curl);
}
return 0;
}
AVAILABILITY
Added in 7.21.0
RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
SEE ALSO
curl_easy_getinfo(3), curl_easy_setopt(3), CURLINFO_PRIMARY_PORT(3), CURLINFO_LOCAL_IP(3),
libcurl 7.54.0 March 16, 2017 CURLINFO_LOCAL_PORT(3)