Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

zmv, case insensivity and possible the lack of coffee


To sanitize some odd filenames I wrote a script like this

    #! /bin/zsh
    detox '*=\ *'
    zmv '(*)OddString(*)' '$1$2'
    zmv '(*)oddstring(*)' '$1$2'

In a hurry I didn't found a hint to make the regular expression for the
zmv command case insensitive (looked through man zshall).

So I put the two possibilities into two commands.
It can happen that there is only one kind of affected files or both

If even detox fails, the script fails none of the zmvs will be
If the first zmv failed the second will not be tried.

Adding all with && does not help, the script fails in any case.

Assuming I simply didnt drink enough coffe this morning (its quite too
hot for coffee) I nonetheless dare to ask the community to help even
this is in all probability a nooby question.

This morning I am too old...please help me think...

Thanks a lot for any help in advance!
Best regards

Messages sorted by: Reverse Date, Date, Thread, Author