On 06/08/2014 02:40 PM, Renato Silva wrote:
>
> Along with the patch I'm attaching the *nix build I used in my tests. The
> patch is against current head [5]. I'm also attaching a sample program
> "canonname" demonstrating the use of the new API (web [6], source code,
> windows, *nix). Feedback 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-pc-linux-gnu'
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKA
On Jun 9, 2014 10:41 AM, "Thibault, Daniel"
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-g
On 06/09/2014 07:11 AM, Thibault, Daniel wrote:
> Description:
> The string comparison operators -n and -z are designed to be mutually
> complementary. ! -z should be interchangeable with -n and ! -n should be
> interchangeable with -z. But such is not the case. Consider these lines:
The bug
On Mon, Jun 09, 2014 at 01:11:31PM +, Thibault, Daniel wrote:
> Consider these lines:
>
> $ if [ -z `pgrep pname` ]; then echo "not r" ; else echo "r" ; fi
> $ if [ ! -z `pgrep pname` ]; then echo "r" ; else echo "not r" ; fi
> $ if [ -n `pgrep pname` ]; then echo "r" ; else echo "not r" ;
Running this script with your own bash path demonstrates the bug.
#!/home/ian/opt/bash/bash --norc
shopt -s extglob
shopt -s dotglob
cd $(mktemp -d)
mkdir a
touch a/.b
touch a/c
echo a/!(.b)
output:
a/. a/.. a/c
this happens with all bash versions 4.3+ (latest is patch 18).
before that, the out
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/local/share
On Mon, Jun 9, 2014 at 7:51 PM, Dale R. Worley wrote:
> But if I add braces around the condition, 'time' is recognized:
That's not too surprising. That "!" is unaffected is. "if ! ! time :;
then ..." is an equivalent but working pipeline. "if time { :; };"
should also be valid but time isn't reco