How about
Code:
grep -q '^username:' /etc/passwd
Since it won't return anything you could check the exit status.
Alternatively you could use
Code:
grep -c '^username:' /etc/passwd
which will return the number of matches. Since a username is supposed to be unique it will return 1 on success and 0 if the user is not found.