From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19935 invoked from network); 28 Mar 2004 21:00:18 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 28 Mar 2004 21:00:18 -0000 Received: (qmail 5294 invoked by alias); 28 Mar 2004 21:00:06 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7284 Received: (qmail 5279 invoked from network); 28 Mar 2004 21:00:06 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 28 Mar 2004 21:00:06 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [130.225.247.86] by sunsite.dk (MessageWall 1.0.8) with SMTP; 28 Mar 2004 21:0:5 -0000 Received: (qmail 27595 invoked from network); 28 Mar 2004 21:00:05 -0000 Received: from wbar3.sjo1-4-11-009-147.sjo1.dsl-verizon.net (HELO candle.brasslantern.com) (4.11.9.147) by a.mx.sunsite.dk with SMTP; 28 Mar 2004 21:00:03 -0000 Received: (from schaefer@localhost) by candle.brasslantern.com (8.11.6/8.11.6) id i2SL02C26326 for zsh-users@sunsite.dk; Sun, 28 Mar 2004 13:00:02 -0800 X-Authentication-Warning: candle.brasslantern.com: schaefer set sender to schaefer@closedmail.com using -f From: Bart Schaefer Message-Id: <1040328210001.ZM26325@candle.brasslantern.com> Date: Sun, 28 Mar 2004 21:00:01 +0000 In-Reply-To: <20040328200756.GB6311@DervishD> Comments: In reply to DervishD "Re: Is this the Zsh way for doing this?" (Mar 28, 10:07pm) References: <20040325223228.GA13221@DervishD> <1040328005531.ZM19873@candle.brasslantern.com> <1040328010324.ZM19900@candle.brasslantern.com> <20040328200756.GB6311@DervishD> X-Mailer: Z-Mail (5.0.0 30July97) To: Zsh Users Subject: Re: Is this the Zsh way for doing this? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: **** X-Spam-Status: No, hits=4.7 required=6.0 tests=RCVD_IN_DYNABLOCK, RCVD_IN_NJABL,RCVD_IN_NJABL_DIALUP,RCVD_IN_SORBS autolearn=no version=2.63 X-Spam-Hits: 4.7 On Mar 28, 10:07pm, DervishD wrote: } } Thanks a lot for your answer :) No problem; you're welcome. } > # At this point you might also want to clean wildcards and slashes } > # out of $track_name, but that's up to you. Your original doesn't. } } No, it doesn't because I didn't thought of it :( Thanks for } pointing. Could it be solved using the (q) flag or should I use ${//} } and substitute every dangerous character for a safe version? The substituion is necessary for slashes, because you can't even create a file with slashes in the name. The (q) flag is _not_ necessary for other metacharacters when creating the file (the argument to "mv" is already double-quoted); the problem would be with manipulating the names later. So doing either nothing or the substitution is appropriate in that case.