Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Search for text in multiple Word files via the Terminal' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Search for text in multiple Word files via the Terminal
Authored by: clith on Feb 23, '05 10:49:16PM
find doesn't handle spaces well. A command I often execute and have aliased is:
find . -type f -print0 | xargs -0 egrep (your pattern here)
The -print0 and the -0 argument to xargs cause the two tools to use zero-bytes to terminate file names instead of newlines, since the shell doesn't discriminate between newlines and other whitespace in many cases. This means it will handle folders and files with spaces, tabs and other strange characters in their name.

[ Reply to This | # ]