ksh script doesn't exit in Jenkins


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting ksh script doesn't exit in Jenkins
# 1  
Old 08-19-2015
ksh script doesn't exit in Jenkins

I have a ksh script which runs on the commandline of Jenkins.
Script only has commands and few echo statements.I have added set -e as well.
But the issue is that , script completes but donot exits on Jenkins commandline.
whereas when I run it on unix, it executes perfectly and exits.I need to execute the script on Jenkins.Please help me
# 2  
Old 08-19-2015
The various UNIX shells are designed to run a series of commands until they complete and then exit.

I'm not familiar with Jenkins or Hudson, but from the Wiki page for Jenkins it sounds like Jenkins is designed to run a script repeatedly assuming that things might change between iterations that will trigger that script to kick off related activities.

Of course, without actually seeing your script, we can make a lot of wild assumptions that will be totally unrelated to your problem...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Exit 1 doesn't work

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

Exit status of the ksh Script

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

exit status from ksh script exec from java using runtime

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

KSH: Confused with behaviour of exit

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

Ksh script function, how to "EXIT 2" without killing the current process?

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

export variable from ksh script doesn't work

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

HELP WITH .ksh script converting the exit status

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

How to exit the KSH functions

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

ksh script: 'exit' being treated as 'break 2'

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

Exit Code in HP-UX KSH.

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
Login or Register to Ask a Question