Sponsored Content
Homework and Emergencies Homework & Coursework Questions How to Dynamically Pass Parameter to plsql Function & Capture its Output Value in a Shell Variable? Post 303001635 by RudiC on Tuesday 8th of August 2017 08:57:39 AM
Old 08-08-2017
Please make sure you fill in ALL relevant form sections, esp. No. 4!
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Passing a unix variable value to a Plsql function

Suppose I have a unix variable called RGNM which is holding a value. Now I want to call a plsql function in my script. THis plsql function takes one IN parameter. I want to pass my UNIX VARIABLE Value to the plsql function. Can i just give it by giving $RGNM in the function after calling sqlplus... (1 Reply)
Discussion started by: cobroraj
1 Replies

2. Shell Programming and Scripting

[csh] How to capture output from a command and pass it on to a variable?

Hi there! I'm trying to write a script that will capture output from a command and assign it to a variable. Let's say, for example, I'd like to catch from inside the script whatever the following command outputs: ls *.aaa and put it into a variable "listoffiles". What I tried was: set... (3 Replies)
Discussion started by: machinogodzilla
3 Replies

3. Shell Programming and Scripting

pass parameter to function

HI all I have a code like ############################################## minyear() { curryear=$1 echo $curryear } ##Main Program ## minyear exit ####### when i execute "sh scriptname 2005" output should be like 2005 but the output is blank. I guess i need to pass parameter to... (3 Replies)
Discussion started by: vasuarjula
3 Replies

4. Shell Programming and Scripting

How to pass a variable as a parameter to DB2 database from shell script

I need to pass a variable as a parameter from shell script into a DB2 database. var=bhuk_1123_Q_11/22/09 select * from tbl1 where serial_id='$var'; I have tried executing it using db2 -tvf scriptname Somebody please help me out with this. It is throwing an error. Please tell me how... (2 Replies)
Discussion started by: ss3944
2 Replies

5. Shell Programming and Scripting

What is the maximum number of parameter we can pass to a shell script function?

what is the maximum number of parameter we can pass to a shell script function (8 Replies)
Discussion started by: alokjyotibal
8 Replies

6. Shell Programming and Scripting

How to pass parameter to User defined function in shell script?

Hello, Can anyone guide me tin passing parameters into user defined function of shell script (KSH). Here is my code, InsertRecord() { DB_TBL=$(sqlplus $USERID/$PASSWORD@$DATABASE << EOF set head off set feed off set serveroutput on INSERT INTO TBL1 ( OLD_VAL, NEW_VAL, ... (7 Replies)
Discussion started by: Poonamol
7 Replies

7. Shell Programming and Scripting

How to pass a function with a variable parameter into another variable?

Hello again :) Am currently trying to write a function which will delete a record from a file. The code currently looks as such: function deleteRecord() { clear read -p "Please enter the ID of the record you wish to remove: " strID ... (2 Replies)
Discussion started by: U_C_Dispatj
2 Replies

8. Shell Programming and Scripting

Pass a variable string in To_Date Oracle function in shell script

Hello, I am trying to execute an SQL query from shell script. A part of script is something like this: fromDate=`echo $(date +"%F%T") | sed "s/-//g" | sed "s/://g"` $ORACLE_HOME/sqlplus -s /nolog <<EOD1 connect $COSDBUID/$COSDBPWD@$COSDBSID spool... (4 Replies)
Discussion started by: sanketpatel.86
4 Replies

9. Shell Programming and Scripting

How to capture system() function output in variable

How to capture system() function output in awk variable and the print that awk variable..... (8 Replies)
Discussion started by: bharat1211
8 Replies

10. Shell Programming and Scripting

How to pass position parameter into function.?

Hi Gurus, I have request which needs to pass position parameter to a function. I tried below simple code, it doesn't work. #!/bin/bash func_1(){ echo $1 } func_1 $ ./set_file abc $ do I need add some to get the position para first? thanks in advance. (3 Replies)
Discussion started by: ken6503
3 Replies
IPSEC_SET_POLICY(3)					   BSD Library Functions Manual 				       IPSEC_SET_POLICY(3)

NAME
ipsec_set_policy, ipsec_get_policylen, ipsec_dump_policy -- manipulate IPsec policy specification structure from readable string LIBRARY
IPsec Policy Control Library (libipsec, -lipsec) SYNOPSIS
#include <netinet6/ipsec.h> char * ipsec_set_policy(char *policy, int len); int ipsec_get_policylen(char *buf); char * ipsec_dump_policy(char *buf, char *delim); DESCRIPTION
ipsec_set_policy() generates IPsec policy specification structure, namely struct sadb_x_policy and/or struct sadb_x_ipsecrequest from human- readable policy specification. Policy specification must be given as C string policy and length len of policy. ipsec_set_policy() will return the buffer of IPsec policy specification structure. You may want the length of the generated buffer such when calling setsockopt(2). ipsec_get_policylen() will return the length. ipsec_dump_policy() converts IPsec policy structure into readable form. Therefore, ipsec_dump_policy() can be regarded as inverse conversion of ipsec_set_policy(). buf points to a IPsec policy structure, struct sadb_x_policy. delim is a delimiter string, which is usually a blank character. If you set delim to NULL, single whitespace is assumed. ipsec_dump_policy() returns pointer to dynamically allocated string. It is caller's responsibility to reclaim the region, by using free(3). policy is formatted as either of the following: direction discard direction must be in or out. direction specifies which direction the policy needs to be applied. With discard policy, packets will be dropped if they match the policy. direction entrust entrust means to consult to SPD defined by setkey(8). direction bypass bypass means to be bypassed the IPsec processing. (packet will be transmitted in clear). This is for privileged socket. direction ipsec request ... ipsec means that the matching packets are subject to IPsec processing. ipsec can be followed by one or more request string, which is formatted as below: protocol / mode / src - dst [/level] protocol is either ah, esp or ipcomp. mode is either transport or tunnel. src and dst specifies IPsec endpoint. src always means ``sending node'' and dst always means ``receiving node''. There- fore, when direction is in, dst is this node and src is the other node (peer). If mode is transport, Both src and dst can be omited. level must be set to one of the following: default, use, require or unique. default means that the kernel should consult the system default policy defined by sysctl(8), such as net.inet.ipsec.esp_trans_deflev. See ipsec(4) regarding the system default. use means that a relevant SA can be used when available, since the kernel may perform IPsec operation against packets when possible. In this case, packets can be transmitted in clear (when SA is not available), or encrypted (when SA is available). require means that a relevant SA is required, since the kernel must perform IPsec operation against pack- ets. unique is the same as require, but adds the restriction that the SA for outbound traffic is used only for this pol- icy. You may need the identifier in order to relate the policy and the SA when you define the SA by manual keying. You can put the decimal number as the identifier after unique like unique: number. number must be between 1 and 32767 . If the request string is kept unambiguous, level and slash prior to level can be omitted. However, it is encouraged to spec- ify them explicitly to avoid unintended behaviors. If level is omitted, it will be interpreted as default. Note that there is a bit difference of specification from setkey(8). In specification by setkey(8), both entrust and bypass are not used. Refer to setkey(8) for detail. Here are several examples (long lines are wrapped for readability): in discard out ipsec esp/transport//require in ipsec ah/transport//require out ipsec esp/tunnel/10.1.1.2-10.1.1.1/use in ipsec ipcomp/transport//use esp/transport//use RETURN VALUES
ipsec_set_policy() returns a pointer to the allocated buffer of policy specification if successful; otherwise a NULL pointer is returned. ipsec_get_policylen() returns with positive value (meaning the buffer size) on success, and negative value on errors. ipsec_dump_policy() returns a pointer to dynamically allocated region on success, and NULL on errors. SEE ALSO
ipsec_strerror(3), ipsec(4), setkey(8) HISTORY
The functions first appeared in WIDE/KAME IPv6 protocol stack kit. IPv6 and IPsec support based on the KAME Project (http://www.kame.net/) stack was initially integrated into FreeBSD 4.0 BSD
May 5, 1998 BSD
All times are GMT -4. The time now is 02:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy