[ale] dreaded spaces in file names....

David Corbin dcorbin at machturtle.com
Tue Jan 20 06:21:24 EST 2004


On Monday 19 January 2004 21:55, John Wells wrote:
> I have a large drive that I run Win4Lin on this drive, which means I have
> a large number of windows files that have spaces in either the file name
> or one of the containing directories.
>
> I often have to search the drive and look for certain patterns in certain
> files.  So, a typical search might look like this:
>
> locate txt | grep '\.txt$' | xargs grep 'mypattern'
>

I haven't tested it, but here's what I'd try:

 locate txt | grep '\.txt$' | sed -e 's/^/"/' -e 's/$/"/' | xargs grep 
'mypattern'


-- 
David Corbin <dcorbin at machturtle.com>



More information about the Ale mailing list