Tuesday, May 21, 2019

Give permission to execute Shell Script ; UNIX

chmod 0755 TestBash.sh






TestBash.sh contents are here
---------------
#!/bin/sh
java HelloWorld
result=$?
echo $result


Gets result from java to shell script----->https://www.chrisnewland.com/java-return-code-in-linux-shell-script-122

if  an error -  bad interpreter: No such file or directory


use below - 

$ sed -i -e 's/\r$//' TestBash.sh &

No comments: