[wplug] Handling spaces in file names

J Aaron Farr farra at apache.org
Fri Nov 19 14:24:09 EST 2004


Hello all.

Simple UNIX scripting question:

I want to do this:

  wc `find . -name *.java`

on a large repository to get total number of lines of code.  But some of
the files or directories have spaces which 'wc' doesn't like.  So, do I
have to write up a script to do this or is there some way I can get 'find'
to print the file names with the spaces escaped?  (ie- "My\ Documents"
instead of "My Documents")

Thanks for any suggestions.
jaaron


More information about the wplug mailing list