From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12157 invoked from network); 17 Jun 2000 01:21:22 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 17 Jun 2000 01:21:22 -0000 Received: (qmail 15979 invoked by alias); 17 Jun 2000 01:21:02 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3177 Received: (qmail 15971 invoked from network); 17 Jun 2000 01:21:00 -0000 Date: Fri, 16 Jun 2000 21:17:34 -0400 From: Clint Adams To: Bart Schaefer Cc: zsh-users@sunsite.auc.dk Subject: Re: more fun with parameter expansion Message-ID: <20000616211734.A10088@scowler.net> References: <20000616145330.A8031@scowler.net> <000616140019.ZM4608@candle.brasslantern.com> <000616144430.ZM4632@candle.brasslantern.com> <20000616145330.A8031@scowler.net> <000616140019.ZM4608@candle.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Mutt/1.0.1i In-Reply-To: <000616140019.ZM4608@candle.brasslantern.com>; from schaefer@candle.brasslantern.com on Fri, Jun 16, 2000 at 02:00:19PM -0700 > Oh, and your solution missed file names that began with a dot, unless you > meant to say that both MARK_DIRS and GLOB_DOTS were needed ... No, I didn't. I hadn't considered dotfiles, actually. > The correct solution is > > for f in **/*(DNOn^M); do > mv -v $i ${${(M)i%/*}:+${i%/*}}${${${(M)i%/*}:-$i}:l:gs/ /_/} > done Of course, you meant to change all the i's to f's or the f to an i. Thanks for the shorter version.