this started out as a grep quetion
trying to look at a file with out the comments in it
i tried grep -v '^\s*;' ; is the comment delimiter.
but this left me with lots of blank lines.
so i tried changing it to perl
perl -e 'while(<>){chomp ; next if ( /^\s*;/); print "[$_]\n"}'
sip.conf
which still prints out the blank lines
this works
perl -e 'while(<>){chomp ; next if ( /^\s*;/); print "[$_]\n" if length
$_ > 0}' sip.conf
or this
perl -nle 'next if ( /^\s*;/); print if length $_ > 0' sip.conf
why doesn't the next force a read of a new line and thus a new $_, why
do I have to check for length of $_
Alex
--
"I do not believe, however, that the government should impose on power plants mandatory emissions reductions for carbon dioxide, which is not a 'pollutant' under the Clean Air Act."
- George W. Bush
03/13/2003
in a letter to Sen. Chuck Hagel (R-NE)
Attachment:
signature.asc
Description: Digital signature