On Sun, Jan 13, 2013 at 03:31:24AM +0100, John Kearney wrote:
> set -o errexit
> test_func() {
> [ ! -d test ] && echo test2
> }
>
> echo test3
> test_func
> echo test4
>
> now so long as test doesn't exist in the cwd it should errexit.
> at least it did for me just now.
Cannot reproduce.
i
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-unknown-linux-gnu'
-DCONF_VENDOR='unknown' -DLOCALEDIR='/usr/share/local
On 1/14/13 8:57 AM, Marco Elver wrote:
> Machine Type: x86_64-unknown-linux-gnu
>
> Bash Version: 4.2
> Patch Level: 42
> Release Status: release
>
> Description:
> If a double-quoted command substitution command contains a
> double-quoted string containing a single-quote, followed b
Am 14.01.2013 14:33, schrieb Greg Wooledge:
> On Sun, Jan 13, 2013 at 03:31:24AM +0100, John Kearney wrote:
>> set -o errexit
>> test_func() {
>> [ ! -d test ] && echo test2
>> }
>>
>> echo test3
>> test_func
>> echo test4
>>
>> now so long as test doesn't exist in the cwd it should errexit.
>>
On Mon, Jan 14, 2013 at 08:08:53PM +0100, John Kearney wrote:
> this should exit.
> #!/bin/bash
>
> set -e
> f() { test -d nosuchdir && echo no dir; }
> echo testings
> f
> echo survived
OK, cool. That gives me more ammunition to use in the war against set -e.
==
Am 14.01.2013 20:25, schrieb Greg Wooledge:
> On Mon, Jan 14, 2013 at 08:08:53PM +0100, John Kearney wrote:
>> this should exit.
>> #!/bin/bash
>>
>> set -e
>> f() { test -d nosuchdir && echo no dir; }
>> echo testings
>> f
>> echo survived
> OK, cool. That gives me more ammunition to use in the w
On Monday, January 14, 2013 01:57:14 PM Marco Elver wrote:
> echo "$(echo "x'" '{1,2}')"
This was fixed in git a while back, but not backported to 4.2. I believe this:
8/21
command.h
- W_NOBRACE: new word flag that
On 1/14/13 2:57 PM, John Kearney wrote:
> I have no idea why errexit exists I doubt it was for lazy people
> thought. its more work to use it.
I had someone tell me one with a straight (electronic) face that -e
exists `to allow "make" to work as expected' since historical make invokes
sh -ce to r
On 1/14/13 11:00 AM, Dan Douglas wrote:
> On Monday, January 14, 2013 01:57:14 PM Marco Elver wrote:
>> echo "$(echo "x'" '{1,2}')"
>
> This was fixed in git a while back, but not backported to 4.2. I believe this:
>
> 8/21
>
On Mon, Jan 14, 2013 at 08:57:41PM +0100, John Kearney wrote:
> ...
> btw
> || return $?
>
> isn't actually error checking its error propagation.
Also btw, I think you can omit the $? in this case; from bash(1):
return [n]
...
If n is omitted, the return status is that of th
Am 14.01.2013 22:09, schrieb Ken Irving:
> On Mon, Jan 14, 2013 at 08:57:41PM +0100, John Kearney wrote:
>> ...
>> btw
>> || return $?
>>
>> isn't actually error checking its error propagation.
> Also btw, I think you can omit the $? in this case; from bash(1):
>
> return [n]
> ...
>
Configuration Information :
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OS
TYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-redhat-linux-gnu' -DCONF_VENDOR
='redhat' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL -DHA
Hello:
i am from China and i am working on investigating the difference
between bash V4.2 and V4.1
according to official log there is a new feature description
"Posix mode shells no longer exit if a variable assignment error
occurs with an assignment preceding a command that is n
13 matches
Mail list logo