On Sun, Apr 13, 2008 at 9:41 AM, Alex Samad <[EMAIL PROTECTED]> wrote:
>  > Try grep -Ev '^(\W*;|$)'
>  great that works, (i changed to \s* instead, also tried the [[:space:]]
>  and it worked)
>
>  I don't understand hwy i need to test for ^$, I had thought that once a
>  line test positive for ^\s*; it would be excluded ?

Because empty lines do not match the '^\W*;' part (they don't have a
';' in them to match the regular expression) and so grep prints them.
The '^$' part matches empty lines and so they are filtered out.

--Amos
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to