Sometimes I need to mass rename filenames, to replace norwegian special 
caracters, to make things work across samba.
On Debian th rename utility user «sed» style replacements, which means one 
command can replace all instances of a character or string recursively in all 
subfolders. But on Mandriva and Mageia, I have to run the exact same command 
multiple times in the same folder to do the same thing. And I can't do it 
recursively.

One example. Say I want to recursively replace all spaces ' ' with an 
underscore '_' on all files in every subfolder under «folder2»

On Debian: 
        replace 's/\ /_/g' folder2/

On Mageia:
        cd folder2
        replace ' ' '_' *
        replace ' ' '_' *
        replace ' ' '_' *
        replace ' ' '_' *

        cd subfolder1
        replace ' ' '_' *
        <repeating>
        <repeating>
        ......
and so on.

Is there a command line utility on Mageia that can do this te way Debian does 
this, without resorting to creating a shellscript each time I need to replace 
something? (I'm no good at scripting, so I've had to do this manually for some 
11 years.)

-- 
Johnny A. Solbu
PGP key ID: 0xFA687324

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to