Search Results

Search: Posts Made By: will_123
15,643
Posted By will_123
I managed to get it fixed with help from KD. ...
I managed to get it fixed with help from KD.

Thanks!

#!/bin/sh
CHECK=`ps -aux | grep start.jar | grep -v grep | wc -l`
if [ $CHECK -eq 0 ]
then
/usr/local/jre-1.7.0/bin/java -jar...
15,643
Posted By will_123
Copied and Pasted that straight in but its still...
Copied and Pasted that straight in but its still throwing an

unexpected operator/operand

on line 6 this time which is again the "fi"
15,643
Posted By will_123
Changed that aswell but it doesn't like the last...
Changed that aswell but it doesn't like the last line "FI"

Same error as before..
15,643
Posted By will_123
Nope that threw another error? ...
Nope that threw another error?


check.sh[9]: [: aux: unexpected operator/operand

The previous error was where i tried to enter exit at the end rather than fi.

I have very limited scripting...
15,643
Posted By will_123
Simple Script to Check running Process
#!/bin/sh

CHECK='ps aux | grep start.jar | grep -v grep | wc -l'

if [ $CHECK = 0 ]
then
/usr/local/jre-1.7.0/bin/java - jar start.jar &
else

fi



Could anybody advise whats up with...
Showing results 1 to 5 of 5

 
All times are GMT -4. The time now is 07:42 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy