On Thu, Jan 07, 2010 at 03:38:23PM +0530, Foss User wrote:
> I want to do some operation on each file ending with .txt. However,
> this script wouldn't work because in each iteration it gets one word
> from the output of find.
Did you read my reply to your last question?
<http://lists.debian.org/debian-user/2010/01/msg00403.html>
Look at the -print0 arg for find and the -0 argument for
xargs.
> Script:
>
> for file in `find -name "*.txt"`
> do
> echo file: $file
> done
You need to quote $file here:
echo file: "$file"
As described in another reply to your last thread,
<http://lists.debian.org/debian-user/2010/01/msg00267.html>
Please ensure you carefully read the replies people have
already written.
--
Jon Dowland
Attachment:
signature.asc
Description: Digital signature