Subject: egrep problem?
To: None <current-users@NetBSD.ORG>
From: Brad Salai <bsalai@law.roc.servtech.com>
List: current-users
Date: 05/06/1998 06:29:00
For a while, daily has been telling me that root and uucp aren't in /etc/ftpusers, when they are.

root is not listed in /etc/ftpusers file.

uucp is not listed in /etc/ftpusers file.

Here`s the test:

# Root and uucp should both be in /etc/ftpusers.
# XXX This should be updated to support the new format...
if [ "$check_ftpusers" = YES ]; then
	list="root uucp"
	for i in $list; do
		if ! egrep "^$i$" /etc/ftpusers > /dev/null ; then
		printf "\n$i is not listed in /etc/ftpusers file.\n"
		fi
	done
fi

It looks ok to me, but when I try 

law:etc {258} egrep ^root /etc/ftpusers
root    deny
law:etc {259} 

I get what looks like a wrong result. 

Is egrep broken?

Brad