Subject: Re: This has GOT to be a bug in ksh...
To: ali \(Anders Lindgren\) <dat94ali@ludat.lth.se>
From: David Laight <david@l8s.co.uk>
List: netbsd-users
Date: 06/18/2002 09:55:50
> 
> Any ideas? I can't believe no-one has stumbled into this before. 
> (Yes, I usually try find -print0 ... xargs -0, and it usually doesn't
>  work for whatever it is I am trying to do for IRL situations)

The shell is working perfectly! you are trying to fix the wrong
problem.

What you need to do is:
	oifs="$IFS"
	IFS=\n
	for f in `find .`
	do
		IFS="$oifs"
		echo $f
	done

ie remove space and tab from IFS - before the output of find is
converted to 'words' by the shell.

(This is ok unless you have any filenames that contain \n characters)

If you wanted the versions with " added around each line to work
you would need to include an 'eval' somewhere....

	David

-- 
David Laight: david@l8s.co.uk