zsh-users
 help / color / mirror / code / Atom feed
* zmv, case insensivity and possible the lack of coffee
@ 2015-08-08  5:43 Meino.Cramer
  2015-08-08  6:15 ` Eric Cook
  2015-08-08 11:01 ` Jun T.
  0 siblings, 2 replies; 4+ messages in thread
From: Meino.Cramer @ 2015-08-08  5:43 UTC (permalink / raw)
  To: zsh-users

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








^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-08-09  0:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-08  5:43 zmv, case insensivity and possible the lack of coffee Meino.Cramer
2015-08-08  6:15 ` Eric Cook
2015-08-08 11:01 ` Jun T.
2015-08-09  0:15   ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).