From owner-freebsd-questions@FreeBSD.ORG Mon Nov 17 09:39:24 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8C70A16A4CE for ; Mon, 17 Nov 2003 09:39:24 -0800 (PST) Received: from mail1.acecape.com (mail1.acecape.com [66.114.74.12]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1EBF743FCB for ; Mon, 17 Nov 2003 09:39:23 -0800 (PST) (envelope-from fran@natserv.net) Received: from p65-147.acedsl.com (p65-147.acedsl.com [66.114.65.147]) by mail1.acecape.com (8.12.10/8.12.10) with ESMTP id hAHHdMnU003828; Mon, 17 Nov 2003 12:39:22 -0500 Date: Mon, 17 Nov 2003 12:41:27 -0500 (EST) From: Francisco Reyes To: Kirk Strauser In-Reply-To: <87ptfv33kk.fsf@strauser.com> Message-ID: <20031117123241.W55057@zoraida.natserv.net> References: <20031113183118.T3617@d66-183-123-52.bchsia.telus.net> <20031113223951.X85161@zoraida.natserv.net> <87ptfv33kk.fsf@strauser.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-questions@freebsd.org Subject: Re: Recursion with grep? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2003 17:39:24 -0000 On Thu, 13 Nov 2003, Kirk Strauser wrote: > Grep works perfectly in that respect, thanks - it's your understanding > that's a bit askew. Say you're in a directory with 'file1.c', 'file2.c', > 'file3.c', etc. When you type: > > grep -r 'string' *.c > > your shell (*not* grep!) is expanding your command line to: Thanks for shedding some light into this topic. > Now, grep's man page says this: > > -r, --recursive > Read all files under each directory, recursively; this is equiv- > alent to the -d recurse option. > > > Do we want something like: > > grep -r *.c > > No. We want to learn the proper usage of our tools. Take a look at the > "find | grep" examples elsewhere in the thread. Although I understand the idea behind keeping tools to specific tasks sometimes tools do get expanded to take on more work. Not saying my request is even the best example of something that should be done, but if you look at the option -Z, --decompress Decompress the input data before searching. This option is only available if compiled with zlib(3) library We could have said exactly the same you said about my suggestion... don't add it.. people should learn how to use find, decompres, grep, YET this option WAS implemented.