public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Alex Schuster" <wonko@wonkology.org>
To: gentoo-user@lists.gentoo.org
Subject: [gentoo-user] Re: emerge of ksh93 erroring out.. who can interpret
Date: Mon, 14 Jan 2008 20:22:05 +0100	[thread overview]
Message-ID: <courier.478BB65D.00006559@zone.wonkology.org> (raw)
In-Reply-To: <87tzlg2uji.fsf@newsguy.com>

reader@newsguy.com writes: 

> Alex Schuster <wonko@wonkology.org> writes: 
> 
>> reader@newsguy.com writes:

> But I was really just saying that syntax at my low level of usage is
> largely interchangeable but for the cases I mentioned.  So it makes
> switching scripting shells from ksh93 to bash pretty smooth.

Well, good luck then :) 


> Something for your consideration I learned on comp.unix.shell that
> ksh93 can handle associative arrays where as bash cannot or maybe just
> not as easily.  The example given by Icarus S. there for ksh93 was:
[...] 

> You may find that discussion interesting

Yeah, this is one of the things I would also like very much to have. But the 
Bash FAQ (<http://tiswww.case.edu/php/chet/bash/FAQ>) not only states that 
bash lacks this feature (C2), but also says that this is planned for the 
future (H3). So I wait and hope it will happen soon. Well. Eventually. 


>> The other problem was with the =~ notation and quoting of the regular 
>> expression not being allowed any more. Workaround is to define a variable 
>> (foo) with the expression: [[ "blabla" =~ $foo ]]
> 
> I can't reproduce that here (I mean a problem with quoting the regex)
> but maybe I'm not getting what you mean? Or maybe its been fixed.
[...] 

In bash < 3.2, [[ 1 =~ "1|2|3" ]] worked and evaluated to true, but
[[ 1 =~ 1|2|3 ]] gave a syntax error. In bash >= 3.2, [[ 1 =~ "1|2|3" ]] 
does not match any longer, only [[ 1 =~ 1|2|3 ]] does. The workaround is to 
define a variable foo, and use [[ 1 =~ $foo ]]. 

        Wonko
-- 
gentoo-user@lists.gentoo.org mailing list



      reply	other threads:[~2008-01-14 19:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-07 20:52 [gentoo-user] emerge of ksh93 erroring out.. who can interpret Harry Putnam
2008-01-08  9:39 ` Alan McKinnon
2008-01-09  2:32   ` [gentoo-user] " reader
2008-01-10 19:34     ` Matthias B.
2008-01-11 17:18       ` reader
2008-01-11 18:26         ` Matthias B.
2008-01-11 18:56           ` reader
2008-01-11 21:41             ` Matthias B.
2008-01-14 15:38             ` Alex Schuster
2008-01-14 17:20               ` reader
2008-01-14 19:22                 ` Alex Schuster [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=courier.478BB65D.00006559@zone.wonkology.org \
    --to=wonko@wonkology.org \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox