08-18-2006
You cannot call a function across shell, but you always have the option to open a sub shell in your script and execute the script again. Be cautious while doing so or you can end up writing a recursive function.
regards
Apoorva Kumar
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Let say there is a module fileselection module written in c language which returns the file name. Is it possible to get the file name from the file selection module directly, I mean can we call a c function directly in shell script without doing executable. If possible then how it can be... (1 Reply)
Discussion started by: surjyap
1 Replies
2. UNIX for Advanced & Expert Users
Hi,
is there any way we can see user defined functions in a shell?
thanks in advance,
-Ashish (2 Replies)
Discussion started by: shriashishpatil
2 Replies
3. Shell Programming and Scripting
SUN os KSH
ERROR_CHK () {
ERR_DATA="$ABC"
if `echo "$ABC" | egrep 'PLS|ERROR|ORA'` ; then
echo "Failed: Can't execute procedure ${PRG_NAME} ERROR found "
return 1
else
echo "Info : ${PRG_NAME} done"
fi
}
my function fails iwth
below message
"ERROR: not found"
I think i... (0 Replies)
Discussion started by: Amresh Dubey
0 Replies
4. Shell Programming and Scripting
This is my function which is creating three variables based on counter & writing these variable to database by calling another function writeRecord
but only one record is getting wrote in DB.... Please advise ASAP...:confused:
function InsertFtg
{
FTGSTR=""
echo "Saurabh is GREAT $#"
let... (2 Replies)
Discussion started by: omkar.sonawane
2 Replies
5. Shell Programming and Scripting
Legends,
Can you please debug, what's wrong with the below code.
I am gettng unexpected token error
RebuldPF()
(
#Changing the directory to data directory where the pf exists.
cd /home/sandeep/files
#Listing the names of the Pricefiles for rebuilding
echo "The following pricefiles will... (6 Replies)
Discussion started by: sdosanjh
6 Replies
6. Red Hat
please help me in this script
shell script :1
***********
>cat file1.sh
#!/bin/bash
echo "this is first file"
function var()
{
a=10
b=11
}
function var_1()
{
c=12
d=13 (2 Replies)
Discussion started by: ponmuthu
2 Replies
7. UNIX for Dummies Questions & Answers
I wanted to send email to list of people using mailx in unix. I am getting the emailds from a oracle table and getting the ids in a variable. Shell script is shown below:
-----------------------------------------------------------------------
filename=testdata921 export filename... (5 Replies)
Discussion started by: sasi02
5 Replies
8. Shell Programming and Scripting
Hi Everyone,
I just need a shell script which automatically gives the list of NT IDs mean the Usernames from the list of email ids. We have around 140 users from AMERICAS,ASIAPACIFIC and EMEA User Directories and we have their email ids.For ex. i have email id called naveen-kumar.dasu@hp.com... (7 Replies)
Discussion started by: naveen.dasu
7 Replies
9. Shell Programming and Scripting
I am working on converting shell to Perl script. In shell we have built in function
trap
Do you know alternative in Perl or actually we don't need it?
Thanks for contribution (3 Replies)
Discussion started by: digioleg54
3 Replies
10. UNIX for Beginners Questions & Answers
I wish to pull out a list of all user ids on the system, including the privileged ids, the groups to which they belong to. Sometimes after deleting an id also, its home dir does not get deleted or an entry is left behind in /etc/passwd.
Can someone help me with a script to achieve both. (2 Replies)
Discussion started by: ggayathri
2 Replies
LEARN ABOUT DEBIAN
net::dns::sec::tools::bootstrap
BootStrap(3pm) User Contributed Perl Documentation BootStrap(3pm)
NAME
Net::DNS::SEC::Tools::BootStrap - Optional loading of Perl modules
SYNOPSIS
use Net::DNS::SEC::Tools::BootStrap;
dnssec_tools_load_mods(
PerlModule => 'Additional help/error text'
);
DESCRIPTION
The DNSSEC-Tools package requires a number of Perl modules that are only needed by some of the tools. This module helps determine at run-
time, rather than at installation time, if the right tools are available on the system. If any module fails to load,
dnssec_tools_load_mods() will display an error message and calls exit(). The error message describes how to install a module via CPAN.
The arguments to dnssec_tools_load_mods() are given in pairs. Each pair is a module to try to load (and import) and a supplemental error
message. If the module fails to load, the supplemental error message will be displayed along with the installation-via-CPAN message. If
the error message consists of the string "noerror", then no error message will be displayed before the function exits.
CAVEATS
The module will try to import any exported subroutines from the module into the main namespace. This means that the BootStrap.pm module is
likely to not be useful for importing symbols into other modules. Work-arounds for this are:
- import the symbols by hand
dnssec_tools_load_mods(
PerlModule => 'Additional help/error text'
);
import PerlModule qw(func1 func2);
func1(arg1, arg2);
- call the fully qualified function name
dnssec_tools_load_mods(
PerlModule => 'Additional help/error text'
);
PerlModule::func1(arg1, arg2);
COPYRIGHT
Copyright 2006-2012 SPARTA, Inc. All rights reserved. See the COPYING file included with the DNSSEC-Tools package for details.
AUTHOR
Wes Hardaker <hardaker@users.sourceforge.net>
SEE ALSO
http://www.dnssec-tools.org/
perl v5.14.2 2012-01-27 BootStrap(3pm)