Subject: Re: funny grep
To: None <current-users@NetBSD.ORG>
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
List: current-users
Date: 04/19/1996 10:16:04
> bugs:*:101:100:Bug Filer:/home/hiwis/bugs:/bin/go
> x11:*:102:100:Mr. X:/home/hiwis/x11:/bin/go
> lp:*:110:32766:Max Hit Lp:/var/spool/laser1:/bin/go
> tftp:*:113:32766:Trivial Ftp:/:/dev/null
> ftp:*:200:32766:Anonymous Ftp,,,:/mit/ftp:/dev/null
> anon:*:200:32766:Anonymous Sup,,,:/mit/ftp/pub/NetBSD:/dev/null
> httpd:*:202:40:Humpty Dumpty:/usr/local/etc/httpd:/dev/null

> <root@wipux2:~> grep -v [a-z] /etc/passwd
> tftp:*:113:32766:Trivial Ftp:/:/dev/null
> <root@wipux2:~>

> Why is grep outputting the 'tftp' line ?

Assuming what you quoted is all there is in /etc/passwd, you either
have a file called o or a file called s in your current directory.

You must not have more than one file matching [a-z] in ., though, since
grep didn't print a filename: before the line it found.  (There may be
other possibilities, though I don't think so.  Even assuming you have a
file called z containing the line grep printed, with something like two
backspaces or a carriage return at the beginning, I can't see anything
that could account for grep -v dropping _all_ of /etc/passwd.  Again,
assuming that the lines you quoted do appear there.)

					der Mouse