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
Geeks,
Could you please help me out in my script and identify the missing piece. I need to check/get the exit status of a remote command executed on remote host through script and send out an email when process/processes is/are not running on any/all server(s).
Here's the complete... (5 Replies)
Discussion started by: lovesaikrishna
5 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 have a problem :confused: and I need some help:
I've to process many huge zip files.
I'd code an application that receive the data from a pipe, so I can simple unzip the data and send it (via pipe) to my app.
Something like that:
gzip -dc <file> | app
The problem is: How can I... (7 Replies)
Discussion started by: Rkolbe
7 Replies
6. Shell Programming and Scripting
Hi All,
Is there any way to check exit status of unset variables?
In the following code PathX is not set and the script terminates without checking exit status.
#!/bin/bash
Path="/tmp/log"
cd ${PathX:?}
if ;then
echo "Exit Status : non zero"
else
echo "Exit Status :... (2 Replies)
Discussion started by: sussus2326
2 Replies
7. Shell Programming and Scripting
Hi all,
I am using expect (novice) and would like to check a DB status before kicking off a batch job.
Can anyone help me with such code?
Just a simple check to see if the database is up and running would be suffice.
Thanks (2 Replies)
Discussion started by: Hopper_no1
2 Replies
8. Shell Programming and Scripting
Hi I have following code
I want If whole code executes successfully then return true If found any error then print the error
I tried if ; then
But this checks only for the just upper line execution
#!/bin/bash
PATH1=/var/log/mysql
PATH2=/home/ankur/log
FILE1=mysql-bin.index... (4 Replies)
Discussion started by: kaushik02018
4 Replies
9. Shell Programming and Scripting
HI All,
I am running one shell script, in that script i am calling 4 scripts in the background.
abc.ksh &
efg.ksh &
xky.ksh &
mno.ksh &
please let me know, how could i find the success and failure of each script.
i Cannot use $?, because i want to run all the scripts in parellel.
... (2 Replies)
Discussion started by: javeed7
2 Replies
10. 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