Extglob *?(a)b matches every string

2018-08-12 Thread Mark Polyakov
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS:A -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/s

Re: Number with sign is read as octal despite a leading 10#

2018-08-12 Thread Isaac Marcos
Chet Ramey (mailto:chet.ra...@case.edu>>) wrote: > It doesn't matter. Unary plus and minus are operators, not part of integer constants. But you are confused, what is after the 10# is not an integer constant, it is an string. An string that is being parsed by bash C code and coerced into a sign o

Unexpected delay in using arguments.

2018-08-12 Thread Bize Ma
Try this script: #!/bin/bash TIMEFORMAT='%R' n=1000 m=2 f1 () { :; } f2 () { i=0; time while [ "$((i+=1))" -lt "$n" ]; do :; done i=0; time while [ "$((i+=1))" -lt "$n" ]; do f1; done } test1() { set -- $(seq $m)