Re: LINES and COLUMNS variables are not exported

2006-03-10 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Thierry EXCOFFIER on 2/26/2006 8:59 AM: > > Description: > LINES and COLUMNS variables are not exported, > so applications using these variables can not > find the screen size. POSIX states that "Users should not

trap handler scope wrong?

2006-03-10 Thread Phillip Susi
I ran into something weird the other day, but I'm not sure if it's a bug or not since I'm a bit new to bash shell scripting. Basically I have a script that has structure like this: set -e trap "cat $LOGFILE" ERR { foo bar baz } > $LOGFILE 2>&1 If an error happens inside the {} block, it lo

Re: for VAR; do does not work any more on some platforms

2006-03-10 Thread Chet Ramey
[EMAIL PROTECTED] wrote: > Bash Version: 3.1 > Patch Level: 11 > Release Status: release > > Description: > > In other shells (like bash 3.0, bash 2.x, zsh, dash), > > for VARIABLE; do ...; done > > is equivalent to > > for VARIABLE in "$@"; do ...; done And it is in bash, too. When

Re: BUG: ls -ld directory/

2006-03-10 Thread Chet Ramey
G C McNeil-Watson wrote: > If you do an > > ls -ld directory/ > > for some existing directory then the output contains TWO trailling > slashes: > > drwx-- 2 pypgcm users 4096 Aug 16 2005 directory// [...] > and pick out the appopriate entry. I believe this is a bug. It might be,

Re: LINES and COLUMNS variables are not exported

2006-03-10 Thread Chet Ramey
Thierry EXCOFFIER wrote: > Configuration Information [Automatically generated, do not change]: > Machine: i486 > OS: linux-gnu > Compiler: gcc > Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i486' > -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i486-pc-linux-gnu' > -DCONF_VENDOR='pc' -DLOCALE

Re: double array var expansion

2006-03-10 Thread Chet Ramey
[EMAIL PROTECTED] wrote: > Help! > > Why does this not work? > > n=a > a=( x y z) > echo "$!n[0]" > echo "$!n[1]" > echo "$!n[2]" > > > only value i get is a[0] First of all, you need the braces. Otherwise you get $!, followed by n[0], n[1], and n[2], respectively. Second, once you add the b

Re: BUG: ls -ld directory/

2006-03-10 Thread Eric Blake
> > If you do an > > ls -ld directory/ > > for some existing directory then the output contains TWO trailling > slashes: > > drwx-- 2 pypgcm users 4096 Aug 16 2005 directory// > > I believe this is a bug. This is not a bash problem, so you should have mailed the bug-coreutils mailing

for VAR; do does not work any more on some platforms

2006-03-10 Thread bashbugreport-ta
Configuration Information [Automatically generated, do not change]: Machine: i386 OS: freebsd6.0 Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' -DCONF_OSTYPE='freebsd6.0' -DCONF_MACHTYPE='i386-unknown-freebsd6.0' -DCONF_VENDOR='unknown' -DLOCALEDIR='/tmp/bash/share/loc

for loops without in do not work

2006-03-10 Thread bashbug
Configuration Information [Automatically generated, do not change]: Machine: i386 OS: freebsd4.11 Compiler: cc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' -DCONF_OSTYPE='freebsd4.11' -DCONF_MACHTYPE='i386-portbld-freebsd4.11' -DCONF_VENDOR='portbld' -DLOCALEDIR='/usr/local/share/

core/loop vi mode when '.' used to repeat a replace

2006-03-10 Thread dave
Configuration Information [Automatically generated, do not change]: Machine: i386 OS: freebsd4.8 Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' -DCONF_OSTYPE='freebsd4.8' -DCONF_MACHTYPE='i386-unknown-freebsd4.8' -DCONF_VENDOR='unknown' -DLOCALEDIR='/usr/local/share/lo

BUG: ls -ld directory/

2006-03-10 Thread G C McNeil-Watson
If you do an ls -ld directory/ for some existing directory then the output contains TWO trailling slashes: drwx-- 2 pypgcm users 4096 Aug 16 2005 directory// The directory and the first slash appear in blue on my terminal, trailing slash in black. Piping through something else does not

LINES and COLUMNS variables are not exported

2006-03-10 Thread Thierry EXCOFFIER
Configuration Information [Automatically generated, do not change]: Machine: i486 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i486' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i486-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='b

double array var expansion

2006-03-10 Thread BTrout
Help! Why does this not work? n=a a=( x y z) echo "$!n[0]" echo "$!n[1]" echo "$!n[2]" only value i get is a[0] ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash

Trap on ERR not inherited by subshell with "set -E"

2006-03-10 Thread Markus Laire
Configuration Information [Automatically generated, do not change]: Machine: i386 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash

Failure of removing pattern.

2006-03-10 Thread kenichiro . shirose . jm
Here is a bug report generated by bashbug. Configuration Information [Automatically generated, do not change]: Machine: powerpc OS: aix5.2.0.0 Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='powerpc' -DCONF_OSTYPE='aix5.2.0.0' -DCONF_MACHTYPE='powerpc-ibm-aix5.2.0.0' -DCONF_

Configure script in db-3.3.11 fails with bash-3.1, but, works with ast-ksh

2006-03-10 Thread Rajeev V. Pillai
Configuration Information [Automatically generated, do not change]: Machine: i686 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='b

Re: Bash-3.1 Official patch 10

2006-03-10 Thread Chet Ramey
Greg Schafer wrote: > It appears there might be problem with this patch. Here is a test case I > distilled from the grep-2.5.1a testsuite: > > status=`echo '-'| { ${GREP} -E -e 'a\' >/dev/null 2>&1 ; echo $?; }` > > Put that line into a file called "myfile" then run like this: > > # bash -n myf

Re: Escape newline within quotes in commands

2006-03-10 Thread Chet Ramey
Werner Fink wrote: > BASH PATCH REPORT > = > > Bash-Release: 3.1.5 > Bug-Description: > > Lines like > >g31:bash-3.0 > x=`echo A B C | sed 's/ /\\ >> /g'` >g31:bash-3.0 > echo "$x" >A >B >C > > do

Re: bash reproducibly segfaults while globbing large directory

2006-03-10 Thread Chet Ramey
Nikita Danilov wrote: > Bash Version: 2.05b > Patch Level: 0 > Release Status: release > > Description: > bash 100% reproducibly crashes when trying to do a globbing in a huge > directory Thanks. This will be fixed in the next version. Chet -- ``The lyf so short, the craft so long to

incomplete execution in long backtick expansion

2006-03-10 Thread Brian Minton
Configuration Information [Automatically generated, do not change]: Machine: i486 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i486' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i486-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash

Re: edit-and-execute-command in non-posix vi editing mode fails with default editor

2006-03-10 Thread Mike Stroyan
On Fri, Mar 10, 2006 at 04:40:00PM -0500, Chet Ramey wrote: > Mike Stroyan wrote: ... > > Remove an extra right parenthesis from bashline.c. > > > > --- bash/bashline.c~2006-01-31 13:30:34.0 -0700 > > +++ bash/bashline.c 2006-03-09 12:32:24.0 -0700 > > @@ -800,7 +800,7

Re: Wrong parsing of backslash inside backquote

2006-03-10 Thread Chet Ramey
[EMAIL PROTECTED] wrote: > Configuration Information [Automatically generated, do not change]: > Machine: ia64 > OS: linux > Compiler: gcc -I/usr/src/packages/BUILD/bash-3.1 > -L/usr/src/packages/BUILD/bash-3.1/../readline-5.1 > Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='ia64' > -DCON

Re: document that echo can't be given a NULL

2006-03-10 Thread Eric Blake
> No way to hand echo or /bin/echo a NULL. You mean NUL, not NULL. And printf can do it. > $ set a $'\x00' b > $ echo $# > 3 > $ echo A$'\x01'B|wc -c > 4 > $ echo A$'\x00'B|wc -c > 3 Here, command substitutions strip all NULs from the command's output. POSIX doesn't specify whether this behavi

Re: edit-and-execute-command in non-posix vi editing mode fails with default editor

2006-03-10 Thread Chet Ramey
Mike Stroyan wrote: > Bash Version: 3.1 > Patch Level: 0 > Release Status: release > > Description: > The default edit-and-execute-command behavior for non-posix vi > editing mode fails when EDITOR is not set. It has changed from > using vi in 3.0 to trying to use 'editor' firs

Wrong parsing of backslash inside backquote

2006-03-10 Thread schwab
Configuration Information [Automatically generated, do not change]: Machine: ia64 OS: linux Compiler: gcc -I/usr/src/packages/BUILD/bash-3.1 -L/usr/src/packages/BUILD/bash-3.1/../readline-5.1 Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='ia64' -DCONF_OSTYPE='linux' -DCONF_MACHTYPE='ia64-

edit-and-execute-command in non-posix vi editing mode fails with default editor

2006-03-10 Thread Mike Stroyan
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKA

Re: document that echo can't be given a NULL

2006-03-10 Thread Paul Jarc
Dan Jacobson <[EMAIL PROTECTED]> wrote: > No way to hand echo or /bin/echo a NULL. For /bin/echo, that's because execve() uses null-terminated strings. For bash's builtin echo, it could be done, but then it would be inconsistent with external commands, which might be surprising. paul _

document that echo can't be given a NULL

2006-03-10 Thread Dan Jacobson
No way to hand echo or /bin/echo a NULL. $ set a $'\x00' b $ echo $# 3 $ echo A$'\x01'B|wc -c 4 $ echo A$'\x00'B|wc -c 3 $ echo -n `echo -ne 000`|wc -c 0 BASH_VERSION='3.1.0(1)-release' At least the echo docs should say so. ___ Bug-bash mailing lis