Passing variable value in a function to be used by another function
Hello All,
I would like to ask help from you on how to pass variable value from a function that has been called inside the function. I have created below and
put the variables in " ". Is there another way I can do this? Thank you in advance.
Moderator's Comments:
Please use code tags as required by forum rules!
Last edited by RudiC; 06-22-2016 at 06:17 AM..
Reason: Added code tags.
Is it possible to pass a variable name, as a parameter to a function, so it can be created within this function ?
Something like this:
func_uppercase abcdefgh var_name
where the 1st parameter is the string I want to convert and the 2nd is the desired variable name...
$2=`echo "$1" |... (2 Replies)
Hi,
I am trying to sum up numbered columns and in order to tidy up the program I have wrote a function to do the adding of some numbers. I have a problem though with passing a variable to the function in the UNIX bash shell. The function only gives the first number in the variable list and does... (4 Replies)
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)
I would like to know how to pass a variable inside a variable to a function.
sample code below
--------------
for x in 1 9
do
check_null $C$x ##call function to check if the value is null
if
then
echo "line number:$var_cnt,... (2 Replies)
Hi ,
I have three funcions f1, f2 and f3 .
f1 calls f2 and f2 calls f3 .
I have a global variable "period" which i want to pass to f3 .
Can i pass the variable directly in the definition of f3 ?
Pls help .
sars (4 Replies)
Hi All,
I am new to shell scripting required some help in passing the parameter value to the shell script.
I am writing a shell script, in the script I have created two functions as below.
first function
get_trend_ids () {
Here I am connecting to the database and getting all the... (3 Replies)
following on from below link
https://www.unix.com/shell-programming-scripting/171076-shell-scripting.html#post302573569
i will be using file reading in while loop say for example
while read line123
do
echo "line read is $line123"
insert_funct $line123
done< mysqldump.sql... (6 Replies)
Hi all,
In the given script code .
I want to pass the maximum value that variable "i" will have in function DivideJobs () to variable $max of function SubmitCondorJob().
Any help?
Thanks
#!/bin/bash ... (55 Replies)
May i please know why is it printing the script name for $0 when i pass those parameters to function.
#!/bin/bash -x
usage()
{
echo "In Usage Function"
echo $0
echo $1
echo $2
}
echo "printing first time"
echo $0
echo $1
echo $2
usage $0 $1 $2
Output: (2 Replies)
updateEnvironmentField() {
linewithoutquotes=`echo $LINE | tr -d '"'`
b()
}
I want to pass variable named $linewithoutquotes to another method called b(), which is called from updateEnvironmentField() method. How to do the above requirement with shell script (1 Reply)
Discussion started by: pottic
1 Replies
LEARN ABOUT DEBIAN
semodule_package
SEMODULE_PACKAGE(8) NSA SEMODULE_PACKAGE(8)NAME
semodule_package - Create a SELinux policy module package.
SYNOPSIS
semodule_package -o <output file> -m <module> [-f <file contexts>]
DESCRIPTION
semodule_package is the tool used to create a SELinux policy module package from a binary policy module and optionally other data such as
file contexts. semodule_package packages binary policy modules created by checkmodule. The policy package created by semodule_package can
then be installed via semodule.
EXAMPLE
# Build a policy package for a base module.
$ semodule_package -o base.pp -m base.mod -f file_contexts
# Build a policy package for a httpd module.
$ semodule_package -o httpd.pp -m httpd.mod -f httpd.fc
# Build a policy package for local TE rules and no file contexts.
$ semodule_package -o local.pp -m local.mod
OPTIONS -o --outfile <output file>
Policy module package file generated by this tool.
-s --seuser <seuser file>
seuser file to be included in the package.
-u --user_extra <user extra file>
user_extra file to be included in the package.
-m --module <Module file>
Policy module file to be included in the package.
-f --fc <File context file>
File contexts file for the module (optional).
-n --nc <netfilter context file>
netfilter context file to be included in the package.
SEE ALSO checkmodule(8), semodule(8), semodule_unpackage(8)AUTHORS
This manual page was written by Dan Walsh <dwalsh@redhat.com>.
The program was written by Karl MacMillan <kmacmillan@tresys.com>
Security Enhanced Linux Nov 2005 SEMODULE_PACKAGE(8)