running linux executables from linux shell scripts -
i want run executable shell script. executable located @ /usr/bin/to_run.
my shell script(which calling above executable) in /usr/bin folder.
the shell script :
#!/bin/bash #kill existing instances of synergy killall synergys sh "/usr/bin/synergys" if [ $? -eq 1 ]; echo "synergy server started" else echo "error in starting" fi
i getting error saying : "synergys : no process found".
when run same thing - /usr/bin/synergys directly terminal runs fine, within script there problems. don't understand why.
thank in advance.
that error killall
command, it's saying there no candidate processes matching argument.
if don't want notified no processes match, use quiet
option:
killall -q synergys
from killall
man page:
-q, --quiet
do not complain if no processes killed.
Comments
Post a Comment