10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
tail -f $PROGPATH/NBU_pgbaserestore_$1.log | while read LOGLINE
do
if ] && ! ]
then
date "+%d.%B.%Y %H:%M:%S"
echo "ERROR: NBU"
echo "$LOGLINE"
TAILKILL=$(pgrep -P $$ -x tail)
kill -9 $TAILKILL
exit 1
... (3 Replies)
Discussion started by: kvaikla
3 Replies
2. 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
3. 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
4. Shell Programming and Scripting
Hi Everyone,
I am confused on why the below snippet of code is not working as I intend it to do. I have googled and confirmed that "exit" is supposed to abort the execution of the script regardless if the exit was called from inside a function, or the main body of the script.
log_and_die() {
... (3 Replies)
Discussion started by: maddmaster
3 Replies
5. Shell Programming and Scripting
Hi,
Using AIX 5.3 and Ksh.
/>ls -al /usr/bin/ksh
-r-xr-xr-x 5 bin bin 237420 Apr 10 2007 /usr/bin/ksh
/>
I recently started working for a new employer. I have written UNIX K-Shell scripts for many years and have never had this particular issue before. Its perplexing me.
I have... (2 Replies)
Discussion started by: troym72
2 Replies
6. Shell Programming and Scripting
Hi there,
in a script I have
#!/usr/bin/ksh
TEST=hello
export TEST
Problem is, that the variable doesn't get exported. I also tried
typeset -x TEST=hello
When I put the two lines in my .profile, the variable is set fine.
Whats could be the problem here? (4 Replies)
Discussion started by: doc_symbiosis
4 Replies
7. Shell Programming and Scripting
Hi
Can someone help me please?
In a standard UNIX .ksh script, if you have the exit status..say 5...what line do you have to enter into the script for this number to be automatically converted to its actual exit reason by looking up the exit status file...wherever that is?
thanks
angus (1 Reply)
Discussion started by: angusyoung
1 Replies
8. UNIX for Advanced & Expert Users
Hi I am having the script which contains more functions. I want to exit the function if any failure. I tried with exit - the session itself is getting logged out. How can i fix this issue? (11 Replies)
Discussion started by: sharif
11 Replies
9. Shell Programming and Scripting
hi,
in a korn shell script, has anyone ever seen an 'exit' being treated as a 'break 2'? I have a script which has 3 nested loops. Within the inner most loop, i'm trying to exit the script on a fault condition. instead of exiting, it's acting as a 'break 2' and then continuing on with the... (4 Replies)
Discussion started by: gsatch
4 Replies
10. Programming
In one of my programs another process is called using the system command e.g.
lv_error = system("myproc");
where lv_error is declared as an int.
myproc would be returning 0 for success and 1 for failure. e.g.
if (success)
{
return(0);
}else{
return(1);
}
When the return code... (3 Replies)
Discussion started by: mbb
3 Replies