12-13-2010
Capturing output of procedure in variable in shell script
Hi guys
I am calling one DB2 stored proc through unix. It is giving me below output. I want to capture the value 150 in one UNIX variable in shell script. Please let me know how I can achieve this. Thanks in advance
Value of output parameters
--------------------------
Parameter Name : ROW_CNT
Parameter Value : 150
Return Status = 0
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have a procedure with an out parameter, I want to use this value in a shell script, I've done this in perl before but they want this to be a ksh script. what is the syntax to do this.
this was my first thought;
#!/usr/bin/ksh
sqlplus -s scott/tiger@db << EOF
... (1 Reply)
Discussion started by: edog
1 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I have an expression using grep and nawk that captures the ID number of a given Unix process. It gets printed to screen but I don't know how to declare a variable to this returned value!
For example,
ps -ef|grep $project | grep -v grep | nawk '{print $2}'
This returns my number. How... (2 Replies)
Discussion started by: babariba
2 Replies
3. Shell Programming and Scripting
I have the following line in my script:
$sftpcmd $rmthost <<COMMANDS>> $sftplog 2>&1
For some reason this is not capturing the errors from sftp, they go to the file attached to the cron entry
ie
mm hh dd MM * /myscript > cron.out
any idea why?
digital unix 4.0d (6 Replies)
Discussion started by: MizzGail
6 Replies
4. Shell Programming and Scripting
Hi
i'm calling a pl/sql procedure which is returning one variable.
i'm trying to assing this value to variable in shell script
the code i wrote is
** in shell script**
var= 'sqlplus user/pass @ret.sql'
echo $var
**
and
variable dum_var number
exec rt_test(:DUM_VAR);
exit;
in... (4 Replies)
Discussion started by: ap_gore79
4 Replies
5. Shell Programming and Scripting
I am trying to check to see if a file exists on a ftp server, well, I know that cant be done, atleast directly, So I came up with this small script
ftp -n $HOST <<END_SCRIPT
quote USER $USER
quote PASS $PASSWD
cd public_html/crap
dir $FILE
quit
END_SCRIPT
Where the $ variable... (2 Replies)
Discussion started by: designflaw
2 Replies
6. Shell Programming and Scripting
Environment: Sun UNIX
Language: Bourne Shell
I have the following script and it works fine. Unfortunately, from user's perspective, it looks very messy because the user is able to see the output of the process caused by the print command.
Is there a better way to overcome it?
Here's the... (10 Replies)
Discussion started by: totziens
10 Replies
7. Shell Programming and Scripting
Explain this?
$ ls | grep -e "crd\|cs"
crd
cs
$ CLONES=`ls | grep -e "crd\|cs"`;echo $CLONES;
crd cs
$ CLONES=`ls | grep -e "crd\|cs"`;echo "$CLONES";
crd
cs (1 Reply)
Discussion started by: blasto333
1 Replies
8. Shell Programming and Scripting
Greetings,
I need to capture the output of a Sybase stored procedure, inside my
shell script( k shell). Based on this output, I need to call another
perl script, with input arguments as the result set of the procedure
execution. I need to keep looping through and call the perl script, ... (2 Replies)
Discussion started by: rajpreetsidhu
2 Replies
9. Shell Programming and Scripting
hi,
Could anyone tell me how to pass the output values of the PL/SQL procedure to Shell script and how to store that values in a shell script variable...
Thanks in advance... (5 Replies)
Discussion started by: funonnet
5 Replies
10. Shell Programming and Scripting
Hi, I'm new to korn and having trouble capturing the text output from one program in an array that I can then feed into another program. Direct approaches didn't work, so I've tried to break it down thus:
The program lonlat2pixline gives the values I need in the second column, so I print that... (4 Replies)
Discussion started by: daurin
4 Replies
LEARN ABOUT DEBIAN
latexml::parameters
LaTeXML::Parameters(3pm) User Contributed Perl Documentation LaTeXML::Parameters(3pm)
NAME
"LaTeXML::Parameters" - formal parameters, including "LaTeXML::Parameter".
DESCRIPTION
Provides a representation for the formal parameters of LaTeXML::Definitions:
"LaTeXML::Parameter"
represents an individual parameter.
Parameters Methods
"$parameters = parseParameters($prototype,$for);"
Parses a string for a sequence of parameter specifications. Each specification should be of the form
{} reads a regular TeX argument, a sequence of
tokens delimited by braces, or a single token.
{spec} reads a regular TeX argument, then reparses it
to match the given spec. The spec is parsed
recursively, but usually should correspond to
a single argument.
[spec] reads an LaTeX-style optional argument. If the
spec is of the form Default:stuff, then stuff
would be the default value.
Type Reads an argument of the given type, where either
Type has been declared, or there exists a ReadType
function accessible from LaTeXML::Package::Pool.
Type:value, or Type:value1:value2... These forms
pass additional Tokens to the reader function.
OptionalType Similar to Type, but it is not considered
an error if the reader returns undef.
SkipType Similar to OptionalType, but the value returned
from the reader is ignored, and does not occupy a
position in the arguments list.
"@parameters = $parameters->getParameters;"
Return the list of "LaTeXML::Parameter" contained in $parameters.
"@tokens = $parameters->revertArguments(@args);"
Return a list of LaTeXML::Token that would represent the arguments such that they can be parsed by the Gullet.
"@args = $parameters->readArguments($gullet,$fordefn);"
Read the arguments according to this $parameters from the $gullet. This takes into account any special forms of arguments, such as
optional, delimited, etc.
"@args = $parameters->readArgumentsAndDigest($stomach,$fordefn);"
Reads and digests the arguments according to this $parameters, in sequence. this method is used by Constructors.
AUTHOR
Bruce Miller <bruce.miller@nist.gov>
COPYRIGHT
Public domain software, produced as part of work done by the United States Government & not subject to copyright in the US.
perl v5.10.1 2009-06-11 LaTeXML::Parameters(3pm)