03-07-2009
Yes, I Know, but I couldn't change my post subject. It's result of my bad internet connection. Sorry.
please help me
How we can run a string as a function. for exam, I make a hash in perl and put string in the key and a function reference to value.
it's possible?
Last edited by Zaxon; 03-07-2009 at 04:07 AM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
can I call a function in bash script just as in C++
while
do
function()
done
function()
thanks,
Steffen (3 Replies)
Discussion started by: forever_49ers
3 Replies
2. Programming
Hi, Can anyone help me figure out the problem I'm having with a function call?
I have a header file, which sets an enum:
typedef enum {INFO, WARNING, FATAL} Levels;
int log_event (Levels, char *fmt, ...);
..then the function is called this way:
log_event(INFO, "Message text");
... (6 Replies)
Discussion started by: Stevhp
6 Replies
3. Shell Programming and Scripting
I have a function check_ok in my abc.sh. which return me 1 or 0 . I want to call this fuction through other shell script. this shell also send two parameter to calling function.
Can you please tell me how. I am very new in unix.
#!/bin/bash
date_equal()
{
sqlplus -silent... (4 Replies)
Discussion started by: Jamil Qadir
4 Replies
4. Shell Programming and Scripting
hi,
can any one help me to correct this function call.
awk -F "," '{ {first=$1; sec=$2; tro=$3;quat=$4 }
if (tro == "")
{
$3 = search "$file2" "$first" "$file3"
{print $1","$2","$3","$4} }
else
{print $1","$2","$3 $4}}' $file1 > $file
search ()
{ (2 Replies)
Discussion started by: kamel.seg
2 Replies
5. Shell Programming and Scripting
hello,
when i call function inside awk traitement it doesn't work, i don't have error execution but i don't get result and if i call the function outside awk traitement it work well..
there's something special in awk call function??
here is the example :
awk -F "," '{ {first=$1; sec=$2;... (3 Replies)
Discussion started by: kamel.seg
3 Replies
6. Shell Programming and Scripting
How we can start a process if doesn't exists before? (1 Reply)
Discussion started by: Zaxon
1 Replies
7. Infrastructure Monitoring
Hello,
I have a problem with package and name space.
require "/Mehran/DSGateEngineLib/general.pl";
use strict;
sub System_Status_Main_Service_Status_Intrusion_Prevention
{
my %idpstatus;
my @result;
&General_ReadHash("/var/dsg/idp/settings",\%idpstatus);
#print... (4 Replies)
Discussion started by: Zaxon
4 Replies
8. Shell Programming and Scripting
Hi foiks
i am unable to find what is wrong in my code
mu functionality is to exit from shell when i give 99 but it is not calling function ext
Could you please correct me.
read option
if ;
then
ext
else
echo "out"
fi
function ext
{
echo "tested 99 and exit... (12 Replies)
Discussion started by: kojo
12 Replies
9. Shell Programming and Scripting
Below is my script that is function properly per my conditions but I am facing one problem here that is when one function fails then Iy should not check other functions but it calls the other function too So anyone can help me how could i achieve this?
iNOUT i AM GIVING TO THE... (1 Reply)
Discussion started by: rohit22hamirpur
1 Replies
10. Shell Programming and Scripting
Hi
I have created a function in a Shell Script test.sh
function fnTest()
{
echo "My first Method
}
I have called this function in my test.sh
cat abc.txt | grep "test"
echo " test"
fnTest
But while running the shell script i got the following error:
... (2 Replies)
Discussion started by: nanthagopal
2 Replies
LEARN ABOUT CENTOS
io::socket::ssl::utils
IO::Socket::SSL::Utils(3) User Contributed Perl Documentation IO::Socket::SSL::Utils(3)
NAME
IO::Socket::SSL::Utils -- loading, storing, creating certificates and keys
SYNOPSIS
use IO::Socket::SSL::Utils;
my $cert = PEM_file2cert('cert.pem');
my $string = PEM_cert2string($cert);
CERT_free($cert);
my $key = KEY_create_rsa(2048);
PEM_string2file($key);
KEY_free($key);
DESCRIPTION
This module provides various utility functions to work with certificates and private keys, shielding some of the complexity of the
underlying Net::SSLeay and OpenSSL.
FUNCTIONS
o Functions converting between string or file and certificates and keys. They croak if the operation cannot be completed.
PEM_file2cert(file) -> cert
PEM_cert2file(cert,file)
PEM_string2cert(string) -> cert
PEM_cert2string(cert) -> string
PEM_file2key(file) -> key
PEM_key2file(key,file)
PEM_string2key(string) -> key
PEM_key2string(key) -> string
o Functions for cleaning up. Each loaded or created cert and key must be freed to not leak memory.
CERT_free(cert)
KEY_free(key)
o KEY_create_rsa(bits) -> key
Creates an RSA key pair, bits defaults to 1024.
o CERT_asHash(cert) -> hash
Extracts the information from the certificate into a hash:
serial The serial number
version Certificate version, usually 2 (x509v3)
subject Hash with the parts of the subject, e.g. commonName, countryName, organizationName, stateOrProvinceName, localityName.
subjectAltNames
Array with list of alternative names. Each entry in the list is of "[type,value]", where "type" can be OTHERNAME, EMAIL, DNS,
X400, DIRNAME, EDIPARTY, URI, IP or RID.
not_before, not_after
The time frame, where the certificate is valid, as time_t, e.g. can be converted with localtime or similar functions.
o CERT_create(hash) -> cert
Creates a certificate based on the given hash. Additionally to the information described in "CERT_asHash" the following keys can be
given:
CA true|false
if true declare certificate as CA, defaults to false
key key use given key as key for certificate, otherwise a new one will be generated
issuer_cert cert
set issuer for new certificate
issuer_key key
sign new certificate with given key
If not all necessary information are given some will have usable defaults, e.g.
not_before defaults to the current time
not_after defaults to 365 days in the future
subject has a default pointing to IO::Socket::SSL
version defaults to 2 (x509v3)
serial will be a random number
AUTHOR
Steffen Ullrich
perl v5.16.3 2014-06-10 IO::Socket::SSL::Utils(3)