[Gllug] shell quoting problem

Progga proggaprogga at gmail.com
Wed Jul 2 10:43:46 UTC 2008


On Wed, Jul 02, 2008 at 10:47:13AM +0100, Alain Williams wrote:
> now:
> 
> I wanted to find files that had 'John Smith' as part of the name and 'ls' them.
> 
> 	ls -l $(locate 'John Smith')
> Doesn't work since the spaces are interpretted as argument separators - as I expected.
> 

I got it working like the following.  Doesn't look like a big improvement
though :-(

locate 'Request reward points total.xls' | sed "s/ /\\\ /g" | xargs ls -l

-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list