bug-bash
[Top][All Lists]
Advanced

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

[Bug-bash] offset bug?


From: Alexey Koptsevich
Subject: [Bug-bash] offset bug?
Date: Fri, 15 Sep 2000 17:41:22 +0200

Hello,

It is written in the 'man bash':

${parameter:offset:length}
If offset evaluates to a number less than zero, the value is used as an
offset  from  the  end  of  the value  of  parameter.

But:

address@hidden 17:25:14 148 ~ >echo $HOME
/dioscuri_1/alex
address@hidden 17:32:53 161 ~ >echo ${HOME:-3:0}
/dioscuri_1/alex
address@hidden 17:29:54 155 ~ >echo ${HOME:-3:3}
/dioscuri_1/alex
address@hidden 17:30:01 157 ~ >echo ${HOME:-3:-3}
/dioscuri_1/alex

whereas

address@hidden 17:35:40 169 ~ >echo ${BASH_VERSINFO[*]} 
2 03 0 1 release sparc-sun-solaris2.7

Do I minunderstand anything?

Please cc: me your reply.

Thanks,
Alex





reply via email to

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