10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Main Script
#!/bin/ksh
echo "Maimn script"
./clocal/www/web-data/WAS/WebSphere7/scripts/DealerLocator/Scripts/secondscript.ksh
echo "$? = status"
Sdecond Script
#!/bin/ksh
echo "In second SCript"
exit 1
Output:
Maimn script
./testmain.ksh:... (4 Replies)
Discussion started by: dineshaila
4 Replies
2. Shell Programming and Scripting
Hi all,
I am trying to use a script (a.sh) which is calling another script(b.sh).
And I want to use the exit code(set by me) of b.sh in a.sh.
I am using this in b.sh
#!/bin/sh
<-- code -->
if ; then
exit 0
else
exit 1
fiBut... (2 Replies)
Discussion started by: Raj999
2 Replies
3. Shell Programming and Scripting
Hi
Im trying to write a script that will archive some file using java program.Below is the part of the script that I use and my problem is that the script always return with status 0.Below is part of my script(end part)
purge.ksh
echo "No of files before tar :... (4 Replies)
Discussion started by: saachinsiva
4 Replies
4. Shell Programming and Scripting
Hi ,
I have a bash script , which does the network configuration. Messages from this script are dumped on console as well as stored in a log file .
This script is invoked from a C code using system call . The script returns different exit code , to indicate different error cases. The... (1 Reply)
Discussion started by: abhirai
1 Replies
5. Shell Programming and Scripting
Guys,
I am writing a script that executes a series of commands with a function like:
_Command "ps -ef | grep java"
_Command "vmstat"
_Command "llll"
Even if one of these commands fail, my script should exit with non-zero code i.e 16.
If all commands are successful, my script should exit... (7 Replies)
Discussion started by: sriramperumalla
7 Replies
6. Shell Programming and Scripting
how do i get the exit status from a ksh or perl script executed in a java program using Runtime? (1 Reply)
Discussion started by: twk
1 Replies
7. Shell Programming and Scripting
Hi,
Running Oracle Scheduler 11g2 on an AIX 6.01.
I want to run a shell script (called "external program" in Oracle terminology) which executes some commands and react on the outcome using the exit status $?. For example a "cat thisfiledoesnotexist" and then get the $? which should be not zero.... (6 Replies)
Discussion started by: hermanmol
6 Replies
8. Shell Programming and Scripting
I have a ksh loop that monitors front panel key postitions. I need a keystroke or something to break out of the loop without exiting the script.
Code is:
#!/bin/ksh
while true
do
POST=$(./keystat2 | nawk '{print $1}')
if ]; then
... (2 Replies)
Discussion started by: ScottKe
2 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I have a main program which have below lines
-
awk -f test.awk inputFileName
-
I wonder how to check status return from awk script.
content of awk script:
test.awk
---
if ( pass validation )
{
exit 1
}
else
{ (1 Reply)
Discussion started by: epall
1 Replies
10. Shell Programming and Scripting
Hi,
I have tried with the following code;
if ;then
echo "Failure."
else
echo "Success."
fi
to test the exit status of the test.ksh shell script. But whatever is the exit status of the test.ksh shell script Failure. is always printed.
Please help.
regards,
Dipankar. (2 Replies)
Discussion started by: kdipankar
2 Replies