cc: [email protected] [email protected]
Subject: Re: Re: [ast-developers] ksh -c 'redirect {n}</etc/profile ; cat 
<&{n}'  --> {n}: bad file unit number - why?
--------

> ksh -c 'set -o nounset; builtin cat; redirect {n}</etc/profile ; cat
> <&{n};' does not work with ast-ksh.20130814. The call just hangs.
> 
> 
> ksh -c 'set -o nounset ; builtin cat ; redirect {n}>./my.txt ; { print
> "sample1" >&{n} ; } >/dev/null ; cat my.txt ; true' does not work
> either. It should print 'sample1' on stdout.
> 

Here is a one line patch that should fix both of these.
==============cut here====================
--- old/sh/io.c Mon Aug 12 16:03:50 2013
+++ new/sh/io.c Sun Aug 18 21:01:22 2013
@@ -1152,6 +1152,7 @@
                                                        goto fail;
                                                }
                                                dupfd = nv_getnum(np);
+                                               np = 0;
                                        }
                                        else
                                                dupfd = 
strtol(fname,&number,10);
==============cut here====================

David Korn
[email protected]
_______________________________________________
ast-developers mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-developers

Reply via email to