[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Negative offset with variable expansion doesn't work
|
From: |
Paul Jarc |
|
Subject: |
Re: Negative offset with variable expansion doesn't work |
|
Date: |
Tue, 21 May 2002 11:31:11 -0400 |
|
User-agent: |
Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2 (i686-pc-linux-gnu) |
Chet Ramey <address@hidden> wrote:
>> echo ${var:-2:2}
>
> Of course. The `:-' doesn't specify a negative offset.
But this is an easy mistake to make, given the text of the man page.
It would be helpful to mention that a negative value should be
parenthesized, or preceded by a space, or otherwise distinguished from
the :- case.
paul