Hello, everybody.
i need to run a unix command (let's call it progxy) after
pushing a button only if there is no other instance of
this program already running.
under bash-shell i would use:
ps -C progxy || progxy
i tried:
button .can01.but01 -command {exec ps -C progxy||progxy &}.....
button .can01.but01 -command {[exec ps -C progxy]||[exec progxy &]}.....
etc.
but it seems, that the exec command tries to execute the
return codes of the ps-command.
i get an
Error: invalid command name "345"
from the interpreter.
Does anybody know how the correct syntax is, or how to set the brackets ?
Thanks, rrot
i need to run a unix command (let's call it progxy) after
pushing a button only if there is no other instance of
this program already running.
under bash-shell i would use:
ps -C progxy || progxy
i tried:
button .can01.but01 -command {exec ps -C progxy||progxy &}.....
button .can01.but01 -command {[exec ps -C progxy]||[exec progxy &]}.....
etc.
but it seems, that the exec command tries to execute the
return codes of the ps-command.
i get an
Error: invalid command name "345"
from the interpreter.
Does anybody know how the correct syntax is, or how to set the brackets ?
Thanks, rrot