过滤注释行,超级好用,包括前空白和空白行。

 

grep "^\s*[^# \t].*$"

 

转自:http://haohetao.javaeye.com/blog/655747