zsh-users
 help / color / mirror / code / Atom feed
From: Meino.Cramer@gmx.de
To: zsh-users@zsh.org
Subject: zmv, case insensivity and possible the lack of coffee
Date: Sat, 8 Aug 2015 07:43:33 +0200	[thread overview]
Message-ID: <20150808054333.GC4378@solfire> (raw)

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








             reply	other threads:[~2015-08-08  5:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-08  5:43 Meino.Cramer [this message]
2015-08-08  6:15 ` Eric Cook
2015-08-08 11:01 ` Jun T.
2015-08-09  0:15   ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150808054333.GC4378@solfire \
    --to=meino.cramer@gmx.de \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).