Reputation: 451
I have a.sh and b.sh. I changed shell from bash to ksh. Now it is not invoking b.sh.
a.sh
`#!/bin/ksh
source /home/ec2-user/env
abc_job() {
nohup abc >> $HOME/a.log 2>&1 </dev/null &
}
abc_jbo() >> $HOME/a.log
exit 0`
abc is the binary file of c that invokes b.sh
b.sh
`#!/bin/ksh
echo "completed b.sh job >> $HOME/b.log
exit`
Upvotes: 0
Views: 34
Reputation: 12287
The csh built-in command 'source' has the ksh equivalent '.', in your case:
. /home/ec2-user/env
If execution of /home/ec2-user/env is mandatory you might want to be more defensive and verify that it is present and executable and that it completes successfully.
Upvotes: 1