[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Curly braces expansion not always works as expected.
From: |
Reuti |
Subject: |
Curly braces expansion not always works as expected. |
Date: |
Thu, 5 Oct 2006 00:23:41 +0200 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Date: Thu, 5 Oct 2006 00:19:07 +0200 (CEST)
Configuration Information [Automatically generated, do not change]:
Machine: powerpc
OS: darwin8.0
Compiler: gcc
Compilation CFLAGS: -arch i386 -arch ppc -g -Os -pipe -no-cpp-precomp
- -mdynamic-no-pic -arch i386 -arch ppc -pipe -DPROGRAM='bash'
- -DCONF_HOSTTYPE='powerpc' -DCONF_OSTYPE='darwin8.0' -
DCONF_MACHTYPE='powerpc-apple-darwin8.0' -DCONF_VENDOR='apple' -
DSHELL -DHAVE_C
ONFIG_H -DMACOSX -I. -I/SourceCache/bash/bash-44.2/bash -I/
SourceCache/bash/bash-44.2/bash/include -I/SourceCache/bash/bash-44.2/
bash/lib -arch i386 -arch ppc -g -Os -pipe -no-cpp-precomp -mdynamic-
no-pic -arch i386 -arch ppc -pipe
uname output: Darwin defiant.local 8.8.0 Darwin Kernel Version 8.8.0:
Fri Sep 8 17:18:57 PDT 2006; root:xnu-792.12.6.obj~1/RELEASE_
PPC Power Macintosh powerpc
Machine Type: powerpc-apple-darwin8.0
Bash Version: 2.05b
Patch Level: 0
Release Status: release
Description:
Curly braces expansion only works with at least one comma
(,). This also works, if the appears at least once
inside some apostrophes and has no function.
Repeat-By:
reuti@defiant:~> bash --version
GNU bash, version 2.05b.0(1)-release (powerpc-apple-darwin8.0)
Copyright (C) 2002 Free Software Foundation, Inc.
reuti@defiant:~> echo {"x x"} # No {} in output expected.
{x x}
reuti@defiant:~> echo {"xx"} # No {} in output expected.
{xx}
reuti@defiant:~> echo {"xx","yy"} # Works fine.
xx yy
reuti@defiant:~> echo {"x,x"} # Add a comma to get it
working, i.e. remove the {}.
x,x
reuti@defiant:~>
Also this seems to be strange:
reuti@defiant:~> echo {"klklkl"} {1,2,3} # Only second {}
works correctly.
{klklkl} 1 2 3
reuti@defiant:~> echo {"klklkl"}{1,2,3} # Completely messed up.
{klklkl}{1,2,3}
reuti@defiant:~> echo {"kl,klkl"}{1,2,3} # Add a comma to
get it working
kl,klkl1 kl,klkl2 kl,klkl3
reuti@defiant:~>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFFJDRxFaaMqfE3kdMRAgrfAKCMejocXoiyIMa+5txJ+hmuPHeNTQCginJY
tnVVdtUPfcBcT8T8RCRTY6k=
=Lbpm
-----END PGP SIGNATURE-----
- Curly braces expansion not always works as expected.,
Reuti <=