Alexander Samad wrote:
On Wed, Aug 11, 2004 at 08:49:23AM +0300, [EMAIL PROTECTED] wrote:This doesn't make sense - the "-print0" would just output file names with \0 between them
Looks like you covered it well, except for white space in files.
Just one more thing to consider is that file names might be in non-ascii character set(?). So use "tr [:upper:] [:lower:]" to cover this option.
You can probably get the same effect as the use of "tac" with find's "-depth" switch.
I'd put your script in a file and run it with
"find ... -print0 | xargs -0 your-move-script"
couldn't you do find ... -print0 -exec mv "{}" "$(changecase "{}")" \;
to the standard output and the "-exec" will pass the shell command line arguments of "mv"
without the quotes (and therefore mv will get each white-space separated part of the file name
as a file name by itself). At the least, drop the "-print0" and try to pass the double-quotes
through find into the shell command line, like:
find ... -exec mv '"{}"' '"$(changecase \'\"{}\"\')"' \;and I suspect even these quoting of quotation marks might not work still.
Cheers,
--Amos
-- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
