Date: Mon, 17 Nov 2003 12:41:27 -0500 (EST) From: Francisco Reyes <fran@natserv.net> To: Kirk Strauser <kirk@strauser.com> Cc: freebsd-questions@freebsd.org Subject: Re: Recursion with grep? Message-ID: <20031117123241.W55057@zoraida.natserv.net> In-Reply-To: <87ptfv33kk.fsf@strauser.com> References: <Pine.BSF.4.21.0311131524240.1234-100000@java2.dpcsys.com> <20031113183118.T3617@d66-183-123-52.bchsia.telus.net> <20031113223951.X85161@zoraida.natserv.net> <87ptfv33kk.fsf@strauser.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <string> *.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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031117123241.W55057>