On Thu, 31 Oct 2002, Michael Schwendt wrote: =>-----BEGIN PGP SIGNED MESSAGE----- =>Hash: SHA1 => =>On Thu, 31 Oct 2002 11:53:01 -0500, Hal Burgiss wrote: => =>> On Thu, Oct 31, 2002 at 10:42:03AM -0600, Miguel M wrote: =>> > Hi! =>> > =>> > How can I prevent the "xinetd based services" =>> > to be displayed by "chkconfig --list"? =>> > =>> > I have some scripts which worked well under RHL6.2 =>> > with the output of chkconfig, however the xinetd =>> > section in RHL8 breaks the consistency of the =>> > format and also my scripts :-( =>> =>> chkconfig --list |grep -v "xinetd\|^[^a-z]" =>> =>> Not well tested ... => =>Works fine, but also kills the xinetd line in the first table. =>So let's grep for a bit more: => =>chkconfig --list |grep -v "xinetd b\|^[^a-z]" => Grep is the wrong way to go. You don't want to remove just one line. You want to remove all lines including and after "xinetd based services:". Here's an awk script to solve your problem. Use it like this: chkconfig --list | remove_xinetd #! /bin/awk -f BEGIN {seen_xinetd_services=0;} seen_xinetd_services=0 { print $0;} /xinetd based services:/ { seen_xinetd_services=1; next; } -- -Time flies like the wind. Fruit flies like a banana. Stranger things have - -happened but none stranger than this. Does your driver's license say Organ -Donor?Black holes are where God divided by zero. Listen to me! We are all- -individuals! What if this weren't a hypothetical question? steveo@syslang.net -- Psyche-list mailing list Psyche-list@redhat.com https://listman.redhat.com/mailman/listinfo/psyche-list