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

Reply via email to