09-18-2008
thanks guys (cfajohnson & era) you guys are a great help...
10 More Discussions You Might Find Interesting
1. Solaris
Hi,
I have two files. Want to make an addition of the fifth column of from both the files and redirect it to a third file.
Both files have same records except fifth field and same record should be inserted into new file having fifth field as addition of fifth fields of both files.
for... (2 Replies)
Discussion started by: sanjay1979
2 Replies
2. Shell Programming and Scripting
Hey, I was trying to figure out how to launch a program from the command line, and it works if you pass it a config file. I was thinking about writing a script to dynamically create the config file and pass it to the command using something like command substitution (so I don't actually have to... (3 Replies)
Discussion started by: bj0
3 Replies
3. Shell Programming and Scripting
1) ABC::2197.12:2197.12:120217144365::+DEF:INT:1:N::::6:550.00:0.00:2009-04-29:CN:4547425069636596::6:N:mrs charles:N:PH:00010031:0001'
OUTPUT - ABC::2197.12:2197.12:120217144365::+DEF:INT:1:N::::6:550.00:0.00:2009-04-29:CN:4547******636596::6:N:mrs charles:N:PH:00010031:0001'
The... (5 Replies)
Discussion started by: mad_man12
5 Replies
4. Solaris
Hi,
I have to read a file and translate the contents including substituting the variables if any and write to another file without using sed or awk.
For ex:-
inputfile.txt
-----------
servername=$SERVER
application=$APPL
outputfile.txt
------------
servername=actual server name... (2 Replies)
Discussion started by: axes
2 Replies
5. Shell Programming and Scripting
Hi, i want to change a subs. value in a file, with using a script..
this is my script... (example)
#!/bin/bash
NDIR=`zenity --file-selection --directory`
mv $HOME/Desktop/myfile /tmp/myfile.temp
XT='"'
perl -pe "s/.*/DIR=$XT`echo -e "$NDIR"`$XT/ if $. == 40" <... (2 Replies)
Discussion started by: excsra
2 Replies
6. Shell Programming and Scripting
hi, sorry if this seems trivial.
i have a file url.txt which consists of a list of urls (it was supposed to be my wget -i file). however, since the server from which i am trying to download uses redirect, wget dows not remeber the filename of ther original url will save to a file name which is... (3 Replies)
Discussion started by: texttoolong
3 Replies
7. Shell Programming and Scripting
MyFile contains:
ALTER TABLE $DBN.$TBN
ADD $COL $TYP COMPRESS ($VAL);
I need to cat the file and have it substitute all of the variables with their contents. cat MyFile does not work. The following works for the first line, but errors on the second line because of the paren:
$ while read... (2 Replies)
Discussion started by: Phil27577
2 Replies
8. Shell Programming and Scripting
Hi,
I have file1 like this:
a 64
b 66
c 67and file2 like this:
@1234
1123
aabbcc
@5453
5543
ccbaI want to replace each letter of the third line in file2 with corresponding number in file1. So desired output is,
@1234
1123
646466666767
@5453
5543
67676664I tried something like... (4 Replies)
Discussion started by: polsum
4 Replies
9. Shell Programming and Scripting
I have a huge script which is defining variables with full path of commands in the beginning of code and using those variables in the script.
For Example:
ECHO=/bin/echo
LS=/bin/ls
SED=/bin/sed
AWK=/bin/awk
UNAME=/bin/uname
PS=/bin/ps
DATE=/bin/date
GREP=/bin/grep
$ECHO "hello... (1 Reply)
Discussion started by: veeresh_15
1 Replies
10. Shell Programming and Scripting
Hi,
I have a script in which the file name is always known, but the extension could vary. I want to be able to use a single variable; no if-else statements. For example, if I have config.txt in the directory then that's what I want to use, but if config.xml is in the directory then use that. The... (9 Replies)
Discussion started by: ocbit
9 Replies
LEARN ABOUT MOJAVE
curlopt_ssl_verifypeer
CURLOPT_SSL_VERIFYPEER(3) curl_easy_setopt options CURLOPT_SSL_VERIFYPEER(3)
NAME
CURLOPT_SSL_VERIFYPEER - verify the peer's SSL certificate
SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_VERIFYPEER, long verify);
DESCRIPTION
Pass a long as parameter to enable or disable.
This option determines whether curl verifies the authenticity of the peer's certificate. A value of 1 means curl verifies; 0 (zero) means
it doesn't.
When negotiating a TLS or SSL connection, the server sends a certificate indicating its identity. Curl verifies whether the certificate is
authentic, i.e. that you can trust that the server is who the certificate says it is. This trust is based on a chain of digital signa-
tures, rooted in certification authority (CA) certificates you supply. curl uses a default bundle of CA certificates (the path for that is
determined at build time) and you can specify alternate certificates with the CURLOPT_CAINFO(3) option or the CURLOPT_CAPATH(3) option.
When CURLOPT_SSL_VERIFYPEER(3) is enabled, and the verification fails to prove that the certificate is authentic, the connection fails.
When the option is zero, the peer certificate verification succeeds regardless.
Authenticating the certificate is not enough to be sure about the server. You typically also want to ensure that the server is the server
you mean to be talking to. Use CURLOPT_SSL_VERIFYHOST(3) for that. The check that the host name in the certificate is valid for the host
name you're connecting to is done independently of the CURLOPT_SSL_VERIFYPEER(3) option.
WARNING: disabling verification of the certificate allows bad guys to man-in-the-middle the communication without you knowing it. Disabling
verification makes the communication insecure. Just having encryption on a transfer is not enough as you cannot be sure that you are commu-
nicating with the correct end-point.
DEFAULT
By default, curl assumes a value of 1.
PROTOCOLS
All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.
EXAMPLE
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
/* Set the default value: strict certificate check please */
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1L);
curl_easy_perform(curl);
}
AVAILABILITY
If built TLS enabled.
RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
SEE ALSO
CURLOPT_SSL_VERIFYHOST(3), CURLOPT_PROXY_SSL_VERIFYPEER(3), CURLOPT_PROXY_SSL_VERIFYHOST(3),
libcurl 7.54.0 February 09, 2017 CURLOPT_SSL_VERIFYPEER(3)