From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8944 invoked by alias); 8 Aug 2015 05:43:56 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 20393 Received: (qmail 2756 invoked from network); 8 Aug 2015 05:43:51 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.0 Date: Sat, 8 Aug 2015 07:43:33 +0200 From: Meino.Cramer@gmx.de To: zsh-users@zsh.org Subject: zmv, case insensivity and possible the lack of coffee Message-ID: <20150808054333.GC4378@solfire> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: mutt-ng/devel-r804 (Linux) X-Provags-ID: V03:K0:PrG2gD3LXsZixbKUjH/hHwSvS3huF6FOCLa0MtxoITfdDmE3+6u Ta3qZsHI7ZRR92LqEoLha+qgZIqVN8gEfs4pffd+CWKMbmEtaRL1GzbVQvf5Qa68tc97Pbu SeZlhZ6M5WiOVLb+TXWqnIrBuT1IH4VOrg405RfuvNPlSMy9LGZTREzwoYFY/cRGowVz/up 24MSsnIiwEe0vG86Pj4og== X-UI-Out-Filterresults: notjunk:1;V01:K0:s03vZjYAdMg=:2PqIiPW72Xj4TAuUqpAdtb h2+Z0Xr1DFJ877BHvqakYcOqBvtyc8MFTIu8sz6qXOCZ98rn3ieA4tVltCgaZgL7NofkOO2IW TZPDWYRXoLyNq//DkjndJx9LiSmpPG36LOxPeDg6e/qGEF+5afZOIzfRe07DlNNUc+vhAewqU Ec4kTh58hPL9wVbhfdzGD4wUt6kMXjSjr8YdX0dS5luF294utwdEUzcZc5qU02HDeHl8Vnjrm hh+23dZhSHUys1uelA5wiq2AiGJmfIPBNJOm0ACEGzYHNyzNkk76j2IwEmFiLFExw8ozYhXTq /VoumX3xiSCplh/cegiIB9cXi6an2/AVccWRnA24JANyKwXRnbCUhUgSe/242e7KlzjnJWU9A 67EZduuZCLJBHKOJXCGaGF8qjJ18v5gneX6F5XRisaHqY36UoL31fC6GOWaRzBmPviR2J7r/m VU0ej/ZRq0JrYvYpHlPC6h6FhcQoqfdsIJnEVB7ViNYymmcLDaRVemqOGaLM8cy6flQE/KLaT eOlTb7vgZuj+rGra/cSvV7VlixTljTCWfEC6ekBLnTo50NQFtZnZu/zwO0DBt8JGjJRISG719 W0aURLmkFWYEEUHpXSDcTRgp4qu6wzgPpYNgIkPpsfJE5mG5fD46Y+z7JfiH1BnF1hxU0RFDB q0jfkC/BJRXvoTrt50o7IhxIfISNeqk4g2ynlXBiPJJ7tYglCbtv/dZm+arHz8xsHGRDZlg5J t4gU5yS96OVlFJEz 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