[Gllug] shell quoting problem

Alain Williams addw at phcomp.co.uk
Thu Jul 3 15:34:03 UTC 2008


On Thu, Jul 03, 2008 at 04:14:50PM +0100, Nix wrote:
> On 2 Jul 2008, Alain Williams stated:
> > 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.
> 
> locate -0 "John Smith" | xargs -0r ls -l

'-0' is new for locate ... on the machine that I was doing this on, not on the
one in front of me ... guess where I used the 'man' command :-)

-- 
Alain Williams
Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer.
+44 (0) 787 668 0256  http://www.phcomp.co.uk/
Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php
Chairman of UKUUG: http://www.ukuug.org/
#include <std_disclaimer.h>
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list