[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

regexp---remove comments---simplification



Not an earth-shattering problem.  I try to remove all those comments
from various config files before emailing them to wherever.  I currently
chain some greps

grep -v '^\ *#' some.conf | grep -v '^\ $' > condensed.file

How would you combine these regexp's to remove a commented line (even if
indented) and a blank line?  My various permutations and combinations
have resulted in errors.
--
gt                  kk5st@sbcglobal.net
 If someone tells you---
 "I have a sense of humor, but that's not funny." 
                                  ---they don't.



Reply to: