Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: ${i:r}-question
- X-seq: zsh-users 9353
- From: Meino Christian Cramer <Meino.Cramer@xxxxxx>
- To: schaefer@xxxxxxxxxxxxxxxx
- Subject: Re: ${i:r}-question
- Date: Sun, 28 Aug 2005 07:12:21 +0200 (CEST)
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: <1050828030710.ZM11889@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <1050827204440.ZM11639@xxxxxxxxxxxxxxxxxxxxxxx> <20050828.025528.59463603.Meino.Cramer@xxxxxx> <1050828030710.ZM11889@xxxxxxxxxxxxxxxxxxxxxxx>
From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
Subject: Re: ${i:r}-question
Date: Sun, 28 Aug 2005 03:07:09 +0000
Hi Bart !
> On Aug 28, 2:55am, Meino Christian Cramer wrote:
> } Subject: Re: ${i:r}-question
> }
> } The code fragment
> }
> } ${${(M)afile%%(.tar|).(7z|bz2|gz)}#.}
> }
> } would fail on files, which are of the pattern
> }
> } zsh-4.2.5-doc.bz2 (only one extension)
>
> What makes you think so?
>
> schaefer[501] afile=zsh-4.2.5-doc.bz2
> schaefer[502] print ${${(M)afile%%(.tar|).(7z|bz2|gz)}#.}
> bz2
> schaefer[503] afile=zsh-4.2.5-doc.tar.gz
> schaefer[504] print ${${(M)afile%%(.tar|).(7z|bz2|gz)}#.}
> tar.gz
> Note that (.tar|) has an empty sub-pattern to the right of the vertical
> bar, so it means ".tar or nothing".
Ah, I see... !!! ENLIGHTMENT! (my previous reply...it was to deep in
the night....sorry)
>
> } or? (and all files, which are no Makefiles.... ;O)
>
> I'm afraid I don't understand what you mean about files that are not
> Makefiles.
>
Oh shit...again a fault of mine (I should not write mails in the
night...) --> ${(M)afile was {${(M)akefile in my eyes...
I will try to make my script run with your suggestions, Bart !
Thanks a lot fo ryour help !
Keep zshing!
Meino
Messages sorted by:
Reverse Date,
Date,
Thread,
Author