Re: kill pidof question
On Sat, Oct 30, 2010 at 10:27:17AM -0400, Thomas H. George wrote:
> I frequently have to kill iceape - it locks up on some images.
>
> Of course the command pidof iceape-bin will return the pid to standard
> output and I can then use this information to kill the program.
> Certainly it must be possible to combine these steps into a single
> command line but my efforts to do so have all failed. Would some pro at
> scripting please set me straight?
>
> Tom
>
(from my old scripts, I found these lines:)
- - - - - - - - - - - - - - - - - -
if [ -z `pidof iceape-bin` ]; then ## (returned zero)
echo "IceApe not running"
fi
...
if [ -n `pidof iceape-bin` ]; then ## (returned non-zero)
echo "IceApe is running"
fi
- - - - - - - - - - - - - - - - - -
hope this might improve your control
Wilko
--
Wilko Fokken . . . . . . . . . . . . . De Künst' geiht wiet, say de Boer;
Landschaftspolder 67 . . . . . . . . . do sach hei 'n Aap.
D-26831 Bunde
-------------------- . . . . . . ("Arts must have come a long way",
Tel. 04953-9219882 . . . . . . . . said the landlord becaming aware of an ape.)
Reply to: