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='/home/lester/bas
Hi,
There seems to be a bug in bash regex.
It doesn't recognise the line start caret:
--Commands:
ONE="/fred"
TWO="fred/"
REGEX='^/'
echo "$ONE $TWO $REGEX"
[[ "$ONE" =~ "$REGEX" ]] && echo yes || echo no
[[ "$TWO" =~ "$REGEX" ]] && echo yes || echo no
--Result:
/fred fred/ ^/
no
no
Not sure
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 Fri, Nov 4, 2011 at 4:31 AM, Graham North wrote:
> Hi,
>
> There seems to be a bug in bash regex.
>
> It doesn't recognise the line start caret:
>
> --Commands:
> ONE="/fred"
> TWO="fred/"
> REGEX='^/'
> echo "$ONE $TWO $REGEX"
> [[ "$ONE" =~ "$REGEX" ]] && echo yes || echo no
> [[ "$TWO" =~ "$
On 11/04/2011 09:09 AM, flong@dell1.localdomain 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-unknown-linux-gn
On Fri, Nov 04, 2011 at 05:30:52PM +0100, Roman Rakus wrote:
> On 11/04/2011 09:09 AM, flong@dell1.localdomain wrote:
> > [[ "-h" =~ '^-h' ]] ; echo $?
> > Should return 0, but instead returns 1.
> >
> It was bug in previous versions of bash in fedora and RHEL.
> This behavior is correct no
You're missing a dollar sign.
Hi,
Current, bash doesn't do command completion between do and done (for loop).
I'm wondering if this feature can be added.
--
Regards,
Peng
Peng Yu wrote:
> Current, bash doesn't do command completion between do and done (for loop).
> I'm wondering if this feature can be added.
Of course bash does do command completion between do and done. Can
you give an exact example test case? On what version of bash?
Bob