You could put the find in a separate script:
find . -print0 | xargs -r0 somestuff.sh
If you go that way, you can just
find . -exec somestuff.sh {} \;
(You might need quotes around the {}.)
Jiri
Michael Meskes [EMAIL PROTECTED] writes:
[snip]
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
Subject: RE: bash programming question
On 19-Jan-99 Michael Meskes wrote:
Hi,
I have a small sh script that does essantially the following:
variable=`find . -print`
for file in $variable
do
some stuff
done
try:
for file in `find . -print`
do
${file}
done
The braces
On 19-Jan-99 Michael Meskes wrote:
Hi,
I have a small sh script that does essantially the following:
variable=`find . -print`
for file in $variable
do
some stuff
done
try:
for file in `find . -print`
do
${file}
done
The braces should help keep the variable
4 matches
Mail list logo