The following regular expression is found in a book I have been reading. It apparently can be used on an /etc/passwd file to find any accounts which have no password. I am having a heck of a time seeing how it works, and I was wondering if someone could run me through it. I will take a stab at what I think it is doing, and then maybe you could correct me where necessary...
grep '^[^:]*::'
Ok, so what I see here is 'Any line that begins with 0 or more characters that are *not* a colon, followed by two colons in a row. Now I would not have questioned my interpretation of the above except that the example in the book showed that such a grep would yield the following:
::0:0:::
Which seems to me to be a line that begins with 0 or more colons, which seems to be negated by the way I understand that regular expression. What am I missing?