set -e's bug

2008-05-07 Thread Hiroshi Fujishima
Configuration Information [Automatically generated, do not change]: Machine: i386 OS: freebsd7.0 Compiler: cc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' -DCONF_OSTYPE='freebsd7.0' -DCONF_MACHTYPE='i386-portbld-freebsd7.0' -DCONF_VENDOR='portbld' -DLOCALEDIR='/usr/local/share/loc

Re: finding the index at which two strings differ

2008-05-07 Thread Dave B
On Tuesday 6 May 2008 22:33, Dave B wrote: > while [ $i -le $((${#a}-1)) ] && [ $i -le $((${#b}-1)) ]; do while [ $i -lt ${#a} ] && [ $i -lt ${#b} ]; do -- D.

Re: Bash messes up spaces in command line agruments.

2008-05-07 Thread Dave B
On Tuesday 6 May 2008 16:20, Herrmann, Justin wrote: > Description: When I try to pass strings inside double or single quotes > as command line arguments to my Bash script, leading spaces, trailing > spaces, and multiple grouped embedded spaces are removed from the > string. This also prevents me

Re: Bash messes up spaces in command line agruments.

2008-05-07 Thread Dave B
On Wednesday 7 May 2008 14:54, Dave B wrote: > $ ./startup ' some words ' > 1 > 0 |./startup| > 0 |./startup| > 1 |some words | > 1 | some words | > # ' some words ' This should have been $ ./startup ' some wor

function names which contain a 'dash' character

2008-05-07 Thread Poor Yorick
ksh refuses to define functions which contain a dash ("-") in the name. The Bash manual also defines 'name' as consisting solely of letters, numbers, and underscores. So shouldn't bash refuse to create functions which contain a dash in the name? -- Yorick

Re: function names which contain a 'dash' character

2008-05-07 Thread Chet Ramey
Poor Yorick wrote: ksh refuses to define functions which contain a dash ("-") in the name. The Bash manual also defines 'name' as consisting solely of letters, numbers, and underscores. So shouldn't bash refuse to create functions which contain a dash in the name? When in posix mode, bash doe