From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1JET0K-0002oC-UL for garchives@archives.gentoo.org; Mon, 14 Jan 2008 17:21:45 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D7334E084C; Mon, 14 Jan 2008 17:20:59 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 19F6CE070E for ; Mon, 14 Jan 2008 17:20:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id AF35A65B87 for ; Mon, 14 Jan 2008 17:20:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at gentoo.org X-Spam-Score: -1.454 X-Spam-Level: X-Spam-Status: No, score=-1.454 required=5.5 tests=[AWL=-1.269, BAYES_40=-0.185] Received: from smtp.gentoo.org ([127.0.0.1]) by localhost (smtp.gentoo.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mpqk0nsBYyVy for ; Mon, 14 Jan 2008 17:20:52 +0000 (UTC) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id 520C165B8B for ; Mon, 14 Jan 2008 17:20:49 +0000 (UTC) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1JESzO-0000xR-8z for gentoo-user@gentoo.org; Mon, 14 Jan 2008 17:20:46 +0000 Received: from adsl-75-3-178-22.dsl.chcgil.sbcglobal.net ([75.3.178.22]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 14 Jan 2008 17:20:46 +0000 Received: from reader by adsl-75-3-178-22.dsl.chcgil.sbcglobal.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 14 Jan 2008 17:20:46 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-user@lists.gentoo.org From: reader@newsguy.com Subject: [gentoo-user] Re: emerge of ksh93 erroring out.. who can interpret Date: Mon, 14 Jan 2008 11:20:33 -0600 Organization: Still searching... Message-ID: <87tzlg2uji.fsf@newsguy.com> References: <20080111192643.37761ba2@buddha> <87ejco42es.fsf@newsguy.com> <200801141638.42281.wonko@wonkology.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: adsl-75-3-178-22.dsl.chcgil.sbcglobal.net User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1 (gnu/linux) Cancel-Lock: sha1:JdW3y2PFIiQPzcEC/aYc0Xqf4tI= Sender: news X-Archives-Salt: c7c386ee-d842-4061-ab07-5590fbc52485 X-Archives-Hash: 39769283b91032bde3edac14a6e6c393 Alex Schuster writes: > reader@newsguy.com writes: > >> So I'm interested in what I might run into. So far it looks like it >> would be ALMOST as easy as symlinking ksh to bash in /bin. > > Uh, this sounds scary :) Yeah, it would be on a system with actual users but here its just me, myself and I. So all that is effected are the ksh scripts I've written and currently use in various places (none are system show stoppers). 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. [...] (for searchers who hit this discussion: I've snipped out very nice information showing how to do ksh93 style `set -A arrary cmd' in bash... and related interesting syntax See Alex S previous message in this thread at Message-ID: <200801141638.42281.wonko@wonkology.org>) > I also had trouble with some bash bugs(*), and have some workarounds in my > scripts, in case they run with older bash versions. But as I cannot ensure > the client systems run kash or zsh, I did not bother to learn them, and > chose bash as my shell. It's amazing what it can do, but I guess zsh and > ksh can do the same, or even more. Pretty much summarizes why I'm switching to bash too. Instead of learning the suggested (in this thread) zsh or staying with ksh93. 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: From: Icarus Sparry Subject: Re: internal alias Newsgroups: comp.unix.shell Date: 11 Jan 2008 17:23:20 GMT Message-ID: <4787a608$0$84193$742ec2ed@news.sonic.net> typeset -A wives wives["fred"]="wilma" wives["barny"]="betty" while read husband do case "${wives[$husband]}" in "") echo Single;; *) echo "Married to ${wives[$husband]}" ;; esac done You may find that discussion interesting > 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. bash --version GNU bash, version 3.2.17(1)-release (i686-pc-linux-gnu) reader > if [[ "bla" =~ bl ]];then echo MATCH;fi MATCH reader > if [[ bla =~ "bl" ]];then echo MATCH;fi MATCH -- gentoo-user@lists.gentoo.org mailing list