Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
${i:r}-question
- X-seq: zsh-users 9346
- From: Meino Christian Cramer <Meino.Cramer@xxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: ${i:r}-question
- Date: Fri, 26 Aug 2005 18:32:16 +0200 (CEST)
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author