From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20333 invoked from network); 26 Aug 2005 16:30:36 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 26 Aug 2005 16:30:36 -0000 Received: (qmail 41647 invoked from network); 26 Aug 2005 16:30:30 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 26 Aug 2005 16:30:30 -0000 Received: (qmail 14490 invoked by alias); 26 Aug 2005 16:30:23 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9346 Received: (qmail 14480 invoked from network); 26 Aug 2005 16:30:23 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 26 Aug 2005 16:30:23 -0000 Received: (qmail 40545 invoked from network); 26 Aug 2005 16:30:22 -0000 Received: from p54850cdb.dip0.t-ipconnect.de (HELO solfire) (84.133.12.219) by a.mx.sunsite.dk with SMTP; 26 Aug 2005 16:30:18 -0000 Received: from localhost ([127.0.0.1]) by solfire with esmtp (Exim 4.42) id 1E8h7p-0004za-2B for zsh-users@sunsite.dk; Fri, 26 Aug 2005 18:32:18 +0200 Date: Fri, 26 Aug 2005 18:32:16 +0200 (CEST) Message-Id: <20050826.183216.75189062.Meino.Cramer@gmx.de> To: zsh-users@sunsite.dk From: Meino Christian Cramer X-Mailer: Mew version 4.1 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Rcpt-To: zsh-users@sunsite.dk X-SA-Exim-Mail-From: Meino.Cramer@gmx.de Subject: ${i:r}-question Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SA-Exim-Version: 4.1+cvs (built Sat, 28 Aug 2004 13:10:40 +0200) X-SA-Exim-Scanned: Yes (on solfire) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.4 Hi, I am currently wrting a little shell script, which encapsulates the new "arepack" addition of atool-0.31.0 (nice tool! use it! :O))). The shell script should repack all archives given on the command line to *.tar.7z _or_ *.7z archives -- depending on whether the original archive was a plain *.bz2 (one file compressed with bzip2) or a *.tar.bz2 (tar archive with bzip2 compressed). Experimenting with expressions similiar to afile="test.tar.bz2" echo ${afile:e} I am wondering, whether it would possible to strip off more than one "instance" of extension ("tar.bz2" instead of "bz2") from "$afile" without using somthing like echo ${${afile:e}} since this would depends on knowing whether it is a *.bz2 or a *.tar.bz2 archive before evaluating the expression, which reveals exactly this information...... :) Thank you very much in advance for any help and enlightment ! ;O))) Have a nice weekend ! Meino