[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to handle whitespace in filenames ???



On Wed, Dec 19, 2001 at 12:26:05PM -0600, Michael D. Schleif wrote:
> 
> More and more, *nix developers are following the dark path of using
> whitespace in directory and filenames -- something which I've always
> detested, from an sa standpoint ;<
> 
> For example, on my upgraded potato box I may want to do something this
> simple:
> 
> 	grep pump `find /etc/ -type f`
> 
> ...
> 
> How do others handle this?

The -exec option under find should't care what the name looks like:

    $ find /etc/ -type f -exec -H pump {} \;

The -H option to grep is needed since grep is run on a single file,
so doesn't report the name by default.

-- 
Ken Irving <jkirving@mosquitonet.com>



Reply to: