|
From: <d9...@ef...> - 2002-09-22 14:10:40
|
> > 'sh -x try' gives: > > > > [root@firewall] /root # sh -x try > > + ps axc > > + grep xntpd > > + [ -n 2569 root 892 S grep xntpd ] > > + echo not zero. > > not zero. > > + ps axc > > + grep getty > > + [ -n 721 root 948 S /sbin/getty 38400 tty1 > > 722 root 948 S /sbin/getty 38400 tty2 > > 18571 root 888 S grep getty ] > > + echo not zero. > > not zero. > > [root@firewall] /root # > > > > Is it clearer now? > > > > Thanks for providing "debugging" of the script. You can try this: > > $ ps axc | grep [x]ntpd > > Put [ ] around xntpd. > > Again, haven't tested on ash, just on ksh. But presuming it is a sh > compatible shell, it should work. > > HTH > > -- > H. D. Lee Weeee! :D Works like a charm. Seems that [x] makes all the difference. What does it do? (Trying to learn a bit about scripts..) /Anders |