From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: To: 9fans@cse.psu.edu Subject: Re: [9fans] 'find' From: "rob pike, esq." In-Reply-To: <3F07C5D3.7030808@null.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Mon, 7 Jul 2003 08:46:45 -0700 Topicbox-Message-UUID: eb9fcbe8-eacb-11e9-9e20-41e7f4b1d025 > What's wrong with grep pattern foo is that it acts differently > from grep pattern foo1 foo2. Whether or not the filename is > displayed as a prefix should be controlled by a command option, > not by how many file arguments there are. i tend to agree. nowadays i use bald 'grep' only on stdin and use a wrapper shell script to look for things in the file system. the script adds the -n option and a /dev/null on the end to force file names. but that's after years (hell, decades) of use. i also agree that the original design was brilliant. in an age when command lines were the only user interface, grep's behavior was a model of thinking of how the user would use the tool. i don't think most users even noticed the behavior for a long time after they became adept with it. today, you'd never write grep the same way. it would be more regular, cleaner, probably noisier, and certainly less user-friendly. -rob