I'd use something like this (in Terminal):
grep -Ev '^[ \t]*(#|$)' /etc/apache2/httpd.conf > newfile.conf

It means, "grep, using an *E*xtended regular expression, returning only 
non-matching lines (in*v*ert), lines with a '#' or the end of the line 
preceded by zero or more spaces or tabs."

This omits blank lines, including lines with only spaces or tabs, and 
commented lines.

On Saturday, August 26, 2017 at 9:36:17 PM UTC-4, BeeRich33 wrote:
>
> Hi folks.  Can I use "Process Lines Containing...", coupled with "Delete 
> Lines" and "Copy To New Document" to make a .conf file with only 
> uncommented lines?
>
> This also needs some empty line removal, but just curious about the 
> previous process.
>
> Cheers
>

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/bbedit.

Reply via email to