On Fri, 24 Aug 2007 09:53:19 +0800 Charlie Bond <[log in to unmask]> wrote: > > Broken "other applications", I'd say. With my trusty tab key, I > > don't have problems with file names with spaces. > > What other applications? (Don't tell me ccp4i, that would be a Bad > > Thing!) > > The following sequence fails with 'spacey' filenames, and uses only > core unix commands (and I like using find/xargs - maybe there is > something more modern however). > > find . -name "*.pdb" | xargs grep -c ^ATOM > Use the -print0 option with find and the -0 option with xargs: find . -name "*.pdb" -print0 | xargs -0 grep -c ^ATOM -Tim -- --------------------------------------------------------- Tim Fenn [log in to unmask] Stanford University, School of Medicine James H. Clark Center 318 Campus Drive, Room E300 Stanford, CA 94305-5432 Phone: (650) 736-1714 FAX: (650) 736-1961 ---------------------------------------------------------