Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='linu
x-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/
local/share/locale'
Dear All,
When using read, it would be really neat to be able to pre-fill the form
with a default (or previous) value.
For example, a script which wants you to enter your name, and thinks
that my name is Richard, but that I might want to correct it.
Alternatively, this would be useful within a
Dear All,
Substrings in bash contain 2 parameters, the start and the length.
Start may be negative, but if length is negative, it throws an error.
My request is that bash should understand negative length. This would be
useful in some occasions, and would be similar to the way PHP does it:
Richard Neill wrote:
$ echo ${stringZ:2: -1} #Wish: start at 2, read till
ERROR #1 before the end. i.e.
# cde
$ echo ${stringZ: -3: -1} #Wish: start 3 back, read till
ERROR #1 before the end.
Jan Schampera wrote:
Richard Neill wrote:
$ echo ${stringZ:2: -1} #Wish: start at 2, read till
ERROR#1 before the end. i.e.
# cde
$ echo ${stringZ: -3: -1}#Wish: start 3 back, read till
ERROR
Jan Schampera wrote:
Richard Neill wrote:
$ echo ${stringZ:2: -1} #Wish: start at 2, read till
ERROR#1 before the end. i.e.
# cde
$ echo ${stringZ: -3: -1}#Wish: start 3 back, read till
ERROR