bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: shorthand attempt at 'basename file .ext'


From: Paul Jarc
Subject: Re: shorthand attempt at 'basename file .ext'
Date: Tue, 25 Mar 2008 17:09:00 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

Linda Walsh <address@hidden> wrote:
> > echo "${{f##*/}%$ext}" (but: -bash: ${{f##*/}%$ext}: bad substitution)
>
> Do I need to use an intermediate variable

Yes.  Unfortunately, the expansion operators work directly on
variables - not on arbitrary strings which may contain other
expansions.


paul




reply via email to

[Prev in Thread] Current Thread [Next in Thread]