[prev in list] [next in list] [prev in thread] [next in thread]
List: ast-users
Subject: Re: [ast-users] code behavior change upgrading to ksh 93t+
From: David Korn <dgk () research ! att ! com>
Date: 2011-05-31 2:53:46
Message-ID: 201105310253.p4V2rkZn025584 () penguin ! research ! att ! com
[Download RAW message or body]
cc: dan.rickhoff@comcast.net
Subject: Re: [ast-users] code behavior change upgrading to ksh 93t+
--------
> After upgrading ksh (from version "s"?), at least one of my scripts is misbehavi
> ng. My system:
>
> $ print ${.sh.version}
> Version AJM 93t+ 2010-02-02
> $ uname -srvpio
> Linux 2.6.18-92.1.13.el5 #1 SMP Thu Sep 4 03:51:21 EDT 2008 x86_64 x86_64 GNU/Li
> nux
>
>
> The following exemplifies the behavior.
>
> This works as expected:
>
> $ sed 's/^/Hello /' <(print "Fred" | sort)
> Hello Fred
>
> However, the following fails to capture the output of the above command in the v
> ariable "x", as it should.
>
> $ x="$(sed 's/^/Hello /' <(print "Fred" | sort))"
> Fred
> $ print "x: $x"
> x:
>
> If I leave out the " | sort", then the output is (correctly) captured in the var
> iable "x".
>
> $ x="$(sed 's/^/Hello /' <(print "Fred"))"
> $ print $x
> Hello Fred
>
> Is this a bug in ksh?
>
This was a bug in ksh93t+ that was fixed for ksh93u. You can pick up ksh93u
from the AST download site, http://www.research.att.com/sw/download/.
I will add this as a regression test so that it will not fail with a future
update.
David Korn
dgk@research.att.com
_______________________________________________
ast-users mailing list
ast-users@research.att.com
https://mailman.research.att.com/mailman/listinfo/ast-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic