[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

bash programming question



Hi,

I have a small sh script that does essantially the following:

variable=`find . -print`

for file in $variable
do
	<some stuff>
done

However, this does not work if there are blanks in the filename as $file
would be incomplete. I cannot simply use -exec for find either since I call
a function from the same script inside the loop. Finally I need to read some
input during this function, so simply piping the find results and reading
them via read doesn't work either. 

Does anyone have an idea how to do this? 

Michael

P.S.: Please CC me on your answer.
-- 
Michael Meskes                         | Go SF 49ers!
Th.-Heuss-Str. 61, D-41812 Erkelenz    | Go Rhein Fire!
Tel.: (+49) 2431/72651                 | Use Debian GNU/Linux!
Email: Michael.Meskes@gmx.net          | Use PostgreSQL!


Reply to: