2006/6/2, Victor Skurihin <[EMAIL PROTECTED]>:
Доброго времени суток, многоуважемые.

Вот для решения сабжа попробовал использовать find,
find ./ -type f -regex ".* .*" -exec mv {} `echo {}|tr ' ' '_'` \;
но не добился желаемого:

[EMAIL PROTECTED] /tmp/testdir $ ls -1
1 test file.txt
2 test file.txt
3 test file.txt
[EMAIL PROTECTED] /tmp/testdir $ find ./ -type f -regex ".* .*" -exec mv {} 
`echo {}|tr ' ' '_'` \;
mv: `./2 test file.txt' and `./2 test file.txt' are the same file
mv: `./3 test file.txt' and `./3 test file.txt' are the same file
mv: `./1 test file.txt' and `./1 test file.txt' are the same file

Подскажите пожалуйста где ошибся?

rename 's/\ /\_/g' *

--
Regards,
Yuri Kozlov

Ответить