Re: Anomaly

2016-09-25 Thread Chet Ramey
On 9/20/16 11:04 PM, PePa wrote: > When sourcing this script (version 1), it will print y after receiving > an interrupt, but not in the 2 different versions (2 and 3). > > # version 1 > echo x > sleep 99 > echo y > > # version 2 > echo x; sleep 99 > echo y > > # version 3 > echo x > sleep 99;

Re: "HISTSIZE=999999999" cause bash failure after lastest upgrade

2016-09-25 Thread Chet Ramey
On 9/25/16 3:51 PM, Sean Zha wrote: > Bash Version: 4.4 > Patch Level: 0 > Release Status: release > > Description: > I use a huge value for HISTSIZE (=9) to enable infinite > history items. The actural size of ~/.bash_history is only 4MB now. > Everything worked fine

Re: bash history with mixed timestamps slow and broken

2016-09-25 Thread Chet Ramey
On 9/24/16 2:17 PM, Hubert Schmid wrote: > 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' >

Re: [BUG] false positive: [ ! -o optname ]

2016-09-25 Thread Chet Ramey
On 9/25/16 5:57 PM, Martijn Dekker wrote: > Op 25-09-16 om 22:40 schreef isabella parakiss: >> On 9/25/16, Martijn Dekker wrote: >>> The '!' operator in the legacy test/[ builtin does not invert the result >>> of the -o operator. Consequently the command >>> >>> [ ! -o

Re: [BUG] false positive: [ ! -o optname ]

2016-09-25 Thread Martijn Dekker
Op 25-09-16 om 22:57 schreef Martijn Dekker: > And indeed your interpretation does not apply to something like > "[ ! -e /tmp ]": > > $ [ -e /tmp ]; echo $? > 0 > $ [ ! -e /tmp ]; echo $? > 1 > > However, the supposed synonym -a acts differently: > > $ [ -a /tmp ]; echo $? > 0 > $ [ ! -a /tmp

Re: Bash bind bug: infinite loop with memory leak in Readline

2016-09-25 Thread Chet Ramey
On 9/22/16 11:23 AM, Christian Klomp wrote: > Limiting the nesting level sounds like a straightforward solution. > Although I'm not sure whether exposing a configurable level is > necessary. Do people actually nest their macros that deep that no > reasonably safe upper bound can be set? There's

Re: [BUG] false positive: [ ! -o optname ]

2016-09-25 Thread Martijn Dekker
Op 25-09-16 om 22:40 schreef isabella parakiss: > On 9/25/16, Martijn Dekker wrote: >> The '!' operator in the legacy test/[ builtin does not invert the result >> of the -o operator. Consequently the command >> >> [ ! -o noclobber ] >> >> amounts to a no-op, always

"HISTSIZE=999999999" cause bash failure after lastest upgrade

2016-09-25 Thread Sean Zha
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'

Re: [BUG] false positive: [ ! -o optname ]

2016-09-25 Thread isabella parakiss
On 9/25/16, Martijn Dekker wrote: > The '!' operator in the legacy test/[ builtin does not invert the result > of the -o operator. Consequently the command > > [ ! -o noclobber ] > > amounts to a no-op, always returning exit status 0. > > Proof: > > $ set -o noclobber && [

[BUG] false positive: [ ! -o optname ]

2016-09-25 Thread Martijn Dekker
The '!' operator in the legacy test/[ builtin does not invert the result of the -o operator. Consequently the command [ ! -o noclobber ] amounts to a no-op, always returning exit status 0. Proof: $ set -o noclobber && [ -o noclobber ] && [ ! -o noclobber ] && echo bug bug

Re: Magnitude of Order "For Loop" performance deltas based on syntax change

2016-09-25 Thread Chet Ramey
On 9/24/16 8:29 AM, Christian Franke wrote: > - Method-2 could be significantly speed up if the order of the array > accesses is reversed: > > for (( i=0; i if (( -(Pi[i] - Pi[i+1]) < min )); then > min=$((-(Pi[i]-Pi[i+1]))) > fi > done > > Result: ~3

Re: Magnitude of Order "For Loop" performance deltas based on syntax change

2016-09-25 Thread Chet Ramey
On 9/23/16 7:15 PM, Tom McCurdy wrote: > Bash Version: 4.3 > Patch Level: 11 > Release Status: release > > Description: > Two nearly identical "For Loop" setups have large deltas in > performance. See test program below. Was confirmed in IRC chat room by > multiple users. Input is very

Re: [PATCH] fix printf %b without an argument

2016-09-25 Thread Chet Ramey
On 9/23/16 8:10 PM, isabella parakiss wrote: > here's a patch that fixes this problem > > $ printf "<%3s><%3b>" > < ><> Thanks for the report. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU