Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to pass value back to the calling script?

Status
Not open for further replies.

prog3

Programmer
Jun 3, 2003
9
US
Hi,

I have a K shell script a.scr calling b.scr.
b.scr does some calulation and returns a value. I need this value passed back on to a.scr for further processing?
Any help on how to pass back the value is greatly appreciated.

Thanks,
Prog3.
 
#!/bin/ksh
# this is a.scr

bValue=$(b.scr)

echo "bValue=${bValue}"

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
The b.scr script must write the result to this standard output:
echo &quot;$CalculedValue&quot;
The a.scr must capture the stdout of the b script:
ValueWanted=`b.scr arglist`

Hope This Help
PH.
 
I would like to know more about your scripts. Pls. list the content before give you a suggestion.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top