Subject: Re: Stopping wildcard expansion?
To: Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
From: Richard Rauch <rkr@rkr.kcnet.com>
List: netbsd-users
Date: 01/10/2000 21:23:59
Two ways work from csh:

 * ^\ will abort the shell process, effectively halting the expansion.
   But this can create a core file.  (You will still be logged in,
   though.)

 * You can use a command such as locate(1) or find(1) to generate the
   file-list.  E.g.:

     grep variable `find .`

   ...then ^C seems to break the find/locate operation.

 * Along similar lines, use xargs(1):

     find . | xargs -n 1 grep variable

   ...the pipe can be broken with ^C, as per usual.

(The last (with -n 1) has the advantage of beginning grep operations ASAP,
instead of trying to collect all of the filenames that it can, first.)

I don't know of any other ways, but that hardly proves anything.  (^&

(I will also confess to having put more time into thinking of ways to
answer your question than I would have put into solving the problem had I
just wanted to grep some files.  I normally tend to do the ``grep <expr>
*/*/*'' type thing, too...*grin*)


  "I probably don't know what I'm talking about."  --rkr@rkr.kcnet.com