Subject: Re: funny grep
To: Andrew Wheadon <andrew@wipux2.wifo.uni-mannheim.de>
From: Michael L. VanLoon -- HeadCandy.com <michaelv@HeadCandy.com>
List: current-users
Date: 04/18/1996 14:57:35
>In article <199604171251.OAA17329@wipux2.wifo.uni-mannheim.de> andrew@wipux2.w
ifo.uni-mannheim.de (Andrew Wheadon) writes:
>><root@wipux2:~> grep -v [a-z] /etc/passwd
>>tftp:*:113:32766:Trivial Ftp:/:/dev/null
>><root@wipux2:~>
>>Why is grep outputting the 'tftp' line ?
>>Cheerio
>[a-z] gets expanded by the shell to a file in the current working directory
>with a single lower case letter filename.
To clarify this for yourself, replace the "grep -v" in that line with
echo:
echo [a-z] /etc/passwd
Make sure you're in the same directory as you where when you grepped.
-----------------------------------------------------------------------------
Michael L. VanLoon michaelv@HeadCandy.com
--< Free your mind and your machine -- NetBSD free un*x >--
NetBSD working ports: 386+PC, Mac 68k, Amiga, Atari 68k, HP300, Sun3,
Sun4/4c/4m, DEC MIPS, DEC Alpha, PC532, VAX...
NetBSD ports in progress: PICA, others...
-----------------------------------------------------------------------------