On Thu, 18 Jan 2001, Chuck Carson wrote:
>
>
> I am trying to grep for a process as follows:
>
> [root@ora3]:/usr/local/admin# ps -ef | grep ntpd
> root 24634 1 0 Jan11 ? 00:40:21 /usr/local/bin/ntpd -p
> /var/log/
> root 27476 27214 0 09:25 pts/21 00:00:00 grep ntpd
>
> Solaris does not print the 2nd line, but RH 62 does. Does
> anyone know any tricks to prevent the second line from
> being displayed.
>
A more robust solution would be:
ps -ec | awk '$6 ~ /ntpd/ {print; exit}'
--
John Darrah (u05192) | Dept: N/C Programming
Giddens Industries | Ph: (425) 353-0405 #229
PO box 3190 | Ph: (206) 767-4212 #229
Everett WA 98203 | Fx: (206) 764-9639
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list
- Silly grep problem within script Chuck Carson
- Re: Silly grep problem within script Joshua Hirsh
- Re: Silly grep problem within script Justin Zygmont
- SCSI adapter recognizes external or internal ... dave-mlist
- Re: SCSI adapter recognizes external or i... Mikkel L. Ellertson
- Re: SCSI adapter recognizes external or i... Edward Dekkers
- Re: Silly grep problem within script jcunning
- Re: Silly grep problem within script Cameron Simpson
- Re: Silly grep problem within script John H Darrah
- Re: Silly grep problem within script rpjday
- Re: Silly grep problem within script Bret Hughes
- Re: Silly grep problem within script Cameron Simpson
- Re: Silly grep problem within sc... Bret Hughes
- Re: Silly grep problem within script Harry Putnam
- RE: Silly grep problem within script John MacLean
- RE: Silly grep problem within script rpjday
- RE: Silly grep problem within script Thierry ITTY
- RE: Silly grep problem within script Matthew Melvin
- RE: Silly grep problem within script Thierry ITTY
