How to get rid of bad chrs?

Little Girl littlergirl at gmail.com
Wed Aug 4 16:37:53 UTC 2021


Hey there,

Ralf Mardorf via ubuntu-users wrote:
>Little Girl wrote:

>>They'd rename a subdirectory before renaming the files  

>Split the task. First use a script/funtion to rename files only. IOW
>use the "test" command to check if an item is a directory and if it
>is a directory, don't rename it. If it is a file, rename it. In the
>next step only rename directories.

Yep, that's probably best.

>I'm uncertain how to treat symbolic links. Probably don't follow
>symbolic links and treat them like files, even if the link is
>against a directory.

I'd probably not touch them and create a list of them that can be
examined later for decisions on what to do with them, if anything.

>Keep in mind the the "find" command might be handy.

Definitely. I've been playing around with that in combination with
echo quite successfully, but when I use it in combination with
replace, it's still falling over for me in a variety of tests. I'll
figure it out eventually. It just needs to be properly wrestled to
the mat, so I'm going a few rounds with it every so often.

-- 
Little Girl

There is no spoon.




More information about the ubuntu-users mailing list