Grepping through the results of apachectl -S
- by CamelBlues
I have a server with about 300 virtual hosts. When I want to make sure a specific httpd.conf file is loaded into the Virual Host config and the syntax is correct, I run apachectl -S. The problem is, though, I get a ton of output.
I've tried apacectl -S | grep 'foo' and apachectl -S > foo.txt to try and make this data a little bit more manageable, but the output of the command is not conducive to grepping or shoving into a text file.
When I try apachectl -S | grep 'foo', it simply returns the entire output of apachectl -S.
When I try apachectl -S > foo.txt, foo.txt is an empty file.
This may have something to do with how the server is configured, because I am able to successfully grep on my local machine.
Any suggestions?