When solving common tasks filtering of comments, e.g. I can do so:
grep -v ^# /etc/apache2/apache2.conf
Such way I got not commented and empty lines. That was expected.
I thought that another way is:
grep ^[^#] /etc/apache2/apache2.conf
However I got the same output but without empty lines. What is the reason?
perl -lane 'print length' /etc/apache2/apache2.conf"empty lines" had zero length (the same as in grep). But it is not entirely clear for me.