I have one bash script which deploys the application inside JBoss9. It's working fine When I runs bash script from ubuntu terminal using command ./jbctl -c restart tail -f nohup.out;
But when I calls same bash script inside Jenkins - Build - Execute shell, it shows me various errors like
./jbctl: line 123: cat: command not found
./jbctl: line 123: grep: command not found
./jbctl: line 123: cut: command not found
./jbctl: line 123: sed: command not found
./jbctl: line 124: cat: command not found
/tmp/jenkins2547454576675677717.sh: line 10: tail: command not found
Build step 'Execute shell' marked build as failure
Finished: FAILURE
Without this jbctl.sh file, application can't be initialised. As there are bash commands inside this ./jbctl.sh file, these are not executed inside Jenkins - Build - Execute shell.
Is there any other way to run this jbctl.sh script inside Jenkins? Actually this is bash script.