Page 1 of 1

before-job subroutine execSH

Posted: Wed May 04, 2011 12:19 pm
by mctny
Can we run two commands consecutively in one line ( in before-job subroutine for the execSH)?

Re: before-job subroutine execSH

Posted: Wed May 04, 2011 12:39 pm
by sandeepgs
Yes We can as mentioned below.

<First script> && <Second script>

Posted: Wed May 04, 2011 1:25 pm
by chulett
As noted, any kind of valid command separator can be used. That && one does a status check, the second command is only executed if the first one succeeds. A semi-colon would be unconditional.

Posted: Wed May 04, 2011 2:24 pm
by mctny
Thanks to you both. it works