title: Jenkins - Execute bash script to deploy application
body: <p>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; </p>
  
  <p>But when I calls same bash script inside Jenkins - Build - Execute shell, it shows me various errors like </p>
  
  <pre><code>    ./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
  </code></pre>
  
  <p>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.</p>
  
  <p><a href="https://i.stack.imgur.com/RjK62.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RjK62.png" alt="enter image description here"></a></p>
  
  <p>Is there any other way to run this jbctl.sh script inside Jenkins? Actually this is bash script.</p>