thanks - I've tried this statement, however I still get the syntax error for the move command; when I replace the mv with echo $i; it writes out the find argument.
e.g. with the move cmd:
for i in 'find . -type f -name "file*" '
do
mv $i $i.bak
done
Output is:
$mv: invalid option
and the echo $i
for i in 'find . -type f -name "file*" '
do
echo $i
done
Are you using single quotes, or backticks? ' or `
Backticks will do what you want. (It's the ` character on the upper-left corner of a standard PC keyboard, usually with the ~ )
If you're using a shell like bash or ksh, you could do it like this:
[...] for each in $(find . -name blah) [...]
But most shells will recognize:
[...] for each in `find . -name blah` [...]