$ ksh -c '[[ 7 = *[^0-9]* ]] || echo bug'   
bug
$ ksh --version                                   
  version         sh (AT&T Research) 93t+ 2010-02-02

This used to work as documented in ksh88.  If it is intended that ^ is
now a synonym for ! in this context, I don't see it in the
documentation.

Also, I haven't received an answer to my previous question about the ksh
trap command causing an error when used in a pipeline (see below).  It
should be trivial for someone to test (just run the example program
given below and type ctrl-c; you either get the error or you don't).
This looks like a ksh bug to me.  Can someone confirm that it is a bug?
Can someone offer a work-around?

Thanks!
-- John

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of 
> Wiersba, John (Hlthcr&Science)
> Sent: Monday, November 22, 2010 11:51 AM
> To: [email protected]
> Subject: RE: [ast-developers] Pipeline+trap causes stty error
> 
> Is anyone able to reproduce the stty error mentioned below?  
> When I run
> it I get:
> 
>    $ test_program
>    prompt: <ENTER CTRL-C HERE>
>    $ stty: setattr: I/O error
> 
> Can anyone offer a suggestion on how to write this to avoid the stty
> error?  I do not get this error when running the script under 
> bash, so I
> think it must be something specific to ksh.
> 
> -- John
> 
> > -----Original Message-----
> > From: [email protected] 
> > [mailto:[email protected]] On Behalf Of 
> > Wiersba, John (Hlthcr&Science)
> > Sent: Friday, November 19, 2010 12:38 PM
> > To: [email protected]
> > Subject: [ast-developers] Pipeline+trap causes stty error
> > 
> > Running the following code and typing cntl-c at the prompt 
> > results in an
> > I/O error from stty on Linux, AIX, Solaris.  The version on Linux is
> > Version AJM 93t+ 2010-02-02; others are ksh88.  Bash does 
> not cause an
> > stty error.
> > 
> > How can I write similar code (with a pipeline) to avoid this issue?
> > 
> > Thanks!
> > -- John
> > 
> > #!/bin/ksh
> > {
> >    trap 'stty echo; exit 1' INT 
> >    stty -echo
> >    printf "prompt: "
> >    read pw
> >    stty echo
> >    trap - INT
> >    echo "<$pw>" >&2
> > } | cat 
> > 
> > _______________________________________________
> > ast-developers mailing list
> > [email protected]
> > https://mailman.research.att.com/mailman/listinfo/ast-developers
> > 
> > 
> 
> _______________________________________________
> ast-developers mailing list
> [email protected]
> https://mailman.research.att.com/mailman/listinfo/ast-developers
> 
> 

_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers

Reply via email to