Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
zmv, case insensivity and possible the lack of coffee
- X-seq: zsh-users 20393
- From: Meino.Cramer@xxxxxx
- To: zsh-users@xxxxxxx
- Subject: zmv, case insensivity and possible the lack of coffee
- Date: Sat, 8 Aug 2015 07:43:33 +0200
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
Hi,
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
kinds.
If even detox fails, the script fails none of the zmvs will be
executed.
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
Meino
Messages sorted by:
Reverse Date,
Date,
Thread,
Author