Gentoo Archives: gentoo-user

From: Alex Schuster <wonko@×××××××××.org>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: emerge of ksh93 erroring out.. who can interpret
Date: Mon, 14 Jan 2008 19:22:36
Message-Id: courier.478BB65D.00006559@zone.wonkology.org
In Reply to: [gentoo-user] Re: emerge of ksh93 erroring out.. who can interpret by reader@newsguy.com
1 reader@×××××××.com writes:
2
3 > Alex Schuster <wonko@×××××××××.org> writes:
4 >
5 >> reader@×××××××.com writes:
6
7 > But I was really just saying that syntax at my low level of usage is
8 > largely interchangeable but for the cases I mentioned. So it makes
9 > switching scripting shells from ksh93 to bash pretty smooth.
10
11 Well, good luck then :)
12
13
14 > Something for your consideration I learned on comp.unix.shell that
15 > ksh93 can handle associative arrays where as bash cannot or maybe just
16 > not as easily. The example given by Icarus S. there for ksh93 was:
17 [...]
18
19 > You may find that discussion interesting
20
21 Yeah, this is one of the things I would also like very much to have. But the
22 Bash FAQ (<http://tiswww.case.edu/php/chet/bash/FAQ>) not only states that
23 bash lacks this feature (C2), but also says that this is planned for the
24 future (H3). So I wait and hope it will happen soon. Well. Eventually.
25
26
27 >> The other problem was with the =~ notation and quoting of the regular
28 >> expression not being allowed any more. Workaround is to define a variable
29 >> (foo) with the expression: [[ "blabla" =~ $foo ]]
30 >
31 > I can't reproduce that here (I mean a problem with quoting the regex)
32 > but maybe I'm not getting what you mean? Or maybe its been fixed.
33 [...]
34
35 In bash < 3.2, [[ 1 =~ "1|2|3" ]] worked and evaluated to true, but
36 [[ 1 =~ 1|2|3 ]] gave a syntax error. In bash >= 3.2, [[ 1 =~ "1|2|3" ]]
37 does not match any longer, only [[ 1 =~ 1|2|3 ]] does. The workaround is to
38 define a variable foo, and use [[ 1 =~ $foo ]].
39
40 Wonko
41 --
42 gentoo-user@l.g.o mailing list