matte <[EMAIL PROTECTED]> wrote:
>    The count would be sufficient, as each folder will always hold ONLY these
>    archives, and no hidden files.
>    Thus, my directory would be:
>    myArcName_1.tar.gz
>    myArcName_2.tar.gz
>    myArcName_3.tar.gz

This will do it, starting the numbering at 0:
set myArcName_[*].tar.gz myArcName_*.tar.gz
if test "$1" = 'myArcName_[*].tar.gz'
   test "$2" = 'myArcName_*.tar.gz'
  then shift
fi
newname=myArcName_$#.tar.gz

If you can assume there are already some files present, numbered from
0, then you can simplify it:
set myArcName_*.tar.gz
newname=myArcName_$#.tar.gz


paul


_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash

Reply via email to