bash-4.2(42) on AIX 6.1 has broken command expansion in double-quoted strings

2013-02-27 Thread Jason Vas Dias
Hi bash gurus - bash appears to be broken on AIX 6.1 - I'd really appreciate some advice : With bash-4.2 patchlevel 42 (the latest available as of today from ftp.gnu.org ), on AIX, the resultant bash built with gcc-4.7.2 and system ld + as, ends up being broken wrt to command output in strings: $

Re: More fun with IFS

2013-02-27 Thread Thorsten Glaser
Dan Douglas dixit: >of any reason it should be inserting a '':'' between the two arguments, >especially for the ''$@'' variants, either quoted or unquoted. It certainly >can't be because of a word splitting step. ‘:’ is ${IFS::1} and inserted because of the word *concatenation* (not splitting)

export in posix mode

2013-02-27 Thread James Mason
I certainly could be doing something wrong, but it looks to me like bash - when in Posix mode - does not suppress the "-n" option for export. The version of bash that I'm looking at is 3.2.25. -jrm

Re: export in posix mode

2013-02-27 Thread Eric Blake
On 02/27/2013 11:07 AM, James Mason wrote: > I certainly could be doing something wrong, but it looks to me like bash > - when in Posix mode - does not suppress the "-n" option for export. > The version of bash that I'm looking at is 3.2.25. So what? Putting bash in posix mode does not require

Re: bash-4.2(42) on AIX 6.1 has broken command expansion in double-quoted strings

2013-02-27 Thread Chet Ramey
On 2/27/13 1:26 PM, Jason Vas Dias wrote: > Hi bash gurus - bash appears to be broken on AIX 6.1 - I'd really > appreciate some advice : > > With bash-4.2 patchlevel 42 (the latest available as of today from > ftp.gnu.org ), > on AIX, the resultant bash built with gcc-4.7.2 and system ld + as, >

Re: export in posix mode

2013-02-27 Thread Bob Proulx
Eric Blake wrote: > James Mason wrote: > > I certainly could be doing something wrong, but it looks to me like bash > > - when in Posix mode - does not suppress the "-n" option for export. > > The version of bash that I'm looking at is 3.2.25. > > So what? Putting bash in posix mode does not re

Re: export in posix mode

2013-02-27 Thread James Mason
On 02/27/2013 04:00 PM, Bob Proulx wrote: Eric Blake wrote: James Mason wrote: I certainly could be doing something wrong, but it looks to me like bash - when in Posix mode - does not suppress the "-n" option for export. The version of bash that I'm looking at is 3.2.25. So what? Putting bash

Re: export in posix mode

2013-02-27 Thread Chet Ramey
On 2/27/13 4:00 PM, Bob Proulx wrote: > The posh shell was constructed specifically to be as strictly > conforming to posix as possible. (Making it somewhat less than useful > in Real Life but it may be what you are looking for.) It is Debian > specific in origin but should work on other systems

Re: export in posix mode

2013-02-27 Thread John Kearney
Am 27.02.2013 22:39, schrieb James Mason: > On 02/27/2013 04:00 PM, Bob Proulx wrote: >> Eric Blake wrote: >>> James Mason wrote: I certainly could be doing something wrong, but it looks to me like bash - when in Posix mode - does not suppress the "-n" option for export. The ver

Re: export in posix mode

2013-02-27 Thread Chet Ramey
On 2/27/13 4:52 PM, John Kearney wrote: > bash posix more just changes bash behaviour that is incompatible with > the posix spec. Nothing more or less. Correct. Limiting behavior to only what Posix specifies or warning about extensions beyond the spec was not in scope. Chet -- ``The lyf so sho

Re: export in posix mode

2013-02-27 Thread Bob Proulx
Chet Ramey wrote: > Keep in mind that posh is overly strict in some areas (e.g., it throws > an error on `exit 1'). It may not be useful in isolation. As I did mention I have found that posh is somewhat less than useful in Real Life. But you say it throws an error on exit 1? $ cat >/tmp/trial

Re: export in posix mode

2013-02-27 Thread Chet Ramey
On 2/27/13 5:17 PM, Bob Proulx wrote: > Chet Ramey wrote: >> Keep in mind that posh is overly strict in some areas (e.g., it throws >> an error on `exit 1'). It may not be useful in isolation. > > As I did mention I have found that posh is somewhat less than useful > in Real Life. But you say it

Re: export in posix mode

2013-02-27 Thread Eric Blake
On 02/27/2013 03:22 PM, Chet Ramey wrote: > I don't know what version you're using; I have 0.11. > > $ ./posh > \[\]${HOST}($SHLVL)\$ exit 1 > ./posh: exit: bad number > > $ ./posh > \[\]${HOST}($SHLVL)\$ exit 10 > ./posh: exit: bad number > $ echo $? > 1 I tested with posh 0.10.2; looks like th

Re: export in posix mode

2013-02-27 Thread Bob Proulx
James Mason wrote: > We considered setting up another shell as the implementation of > "/bin/sh", but that's hazardous in the context of vast amounts of > boot-time initialization scripting that hasn't been vetted as to > avoidance of bash-isms. You appear to be doing product QA. Awesome! Have y

Re: export in posix mode

2013-02-27 Thread Bob Proulx
Chet Ramey wrote: > I don't know what version you're using; I have 0.11. > > $ ./posh > \[\]${HOST}($SHLVL)\$ exit 1 > ./posh: exit: bad number > > $ ./posh > \[\]${HOST}($SHLVL)\$ exit 10 > ./posh: exit: bad number > $ echo $? > 1 I am using 0.11 too. I was using the Debian packaged version.

Re: Should this be this way?

2013-02-27 Thread Linda Walsh
Chet Ramey wrote: > > Your vendor, which may be SuSE, has changed bash and shipped the modified > version. Sorry for the bother. I reported the problem in the proper venue... (thanks)..

Re: Should this be this way?

2013-02-27 Thread Linda Walsh
Greg Wooledge wrote: > > How often, when at a terminal, do you type #!/bin/bash before every line? > > When I've put the contents into a file? Every. single. time. --- Then when I press 'v' to edit the command line in a text editor -- maybe 'bash' should insert such a line? It's converted your

Re: Should this be this way?

2013-02-27 Thread Chris Down
On 2013-02-27 20:05, Linda Walsh wrote: > (maybe distro's shouldn't muck w/user's shells...)... You're using SuSE, which is basically guaranteeing that your programs are mangled in unexpected ways. Then again, it's as bad of an offender as Debian, and most other distributions, I guess... Chris