Robert, Doug, Anthony....thank you. Why I didn't think of egrep I'll never know. Not enough sleep and not enough experience I guess. Here is how I used it that gave me a little better result that I wanted for the output. cat *.conf | egrep "<VirtualHost|ServerName"
You are a life saver. :) Steve At 06:20 PM 9/25/2002 -0400, you wrote: >On Wed, 25 Sep 2002, Steve Buehler wrote: > > > I am trying to run a cat command (on a RedHat 6.2 box) on some files and > > can't seem to get it write. The output that I want is from the apache > conf > > files. I have a lot of the .conf files, one for each domain. The lines > > that I am looking for are "<VirtualHost" and "ServerName" > > The closest that I can come to the command would be: > > cat *.conf | grep "<VirtualHost" > > cat *.conf | grep "ServerName" > > > > I would like to combine them so that it will give the the "<VirtualHost" > > and the next line it will give me the "ServerName" that is in each of the > > .conf files. > > I thought, by the man page for grep, that I could do something like this: > > cat *.conf | grep "<VirtualHost" |; "ServerName" > > But that doesn't work at all. > > > > I would appreciate if someone might be able to help me out here. > >hmmmm .... > >$ egrep "VirtualHost|ServerName" *.conf > >rday > > > >-- >redhat-list mailing list >unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe >https://listman.redhat.com/mailman/listinfo/redhat-list > >-- >This message has been scanned for viruses and >dangerous content by MailScanner, and is >believed to be clean. >ow3 -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ow3 -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe https://listman.redhat.com/mailman/listinfo/redhat-list