[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
parameter expansion malinterpretation
From: |
agathos |
Subject: |
parameter expansion malinterpretation |
Date: |
Sat, 3 Mar 2007 04:47:47 +0100 (CET) |
Configuration Information [Automatically generated, do not change]:
Machine: i586
OS: linux-gnu
Compiler: i586-pc-linux-gnu-gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i586'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i586-pc-linux-gnu'
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL
-DHAVE_CONFIG_H -I. -I. -I./include -I./lib -O2 -march=k6-3 -pipe
uname output: Linux orome 2.6.19-gentoo-r5-FoBoS #1 Sun Feb 4 03:06:28 CET 2007
i586 AMD-K6(tm) 3D+ Processor AuthenticAMD GNU/Linux
Machine Type: i586-pc-linux-gnu
Bash Version: 3.2
Patch Level: 9
Release Status: release
Description:
When introducing negative values in a parameter or variable
substitution dealing with substrings it does not interpret as a negative
number, I think it interprets like a default value substitution
Repeat-By:
agathos@orome ~ $ hello="hello"; echo ${hello:-1}
hello
agathos@orome ~ $ hello="hello"; echo ${hello:(-1)}
o
- parameter expansion malinterpretation,
agathos <=