Hi

just got a users report about different behaviour between two
versions of the ksh.  From the report of Tony Ernst <[email protected]>:

  The following scripts will ask "Which operation would you like to do:"
  Then, no matter what you enter, they will ask "Re-enter selection:"
  At this point, if you enter a character and then a backspace, the cursor moves
  back to the beginning of the line, instead of returning to the end of the
  prompt like it should. This failure only happens on sles11. It worked fine on
  sles10.

  The failure doesn't happen with this script:
  --------
  #!/bin/ksh

  print "  Which operation would you like to do: \c"
  read inp
  print " Re-enter selection: \c"
  read inp
  print " Re-enter selection: \c"
  read inp
  --------

  But it does fail if the 'read' is inside a loop:
  --------
  #!/bin/ksh

  print "  Which operation would you like to do: \c"

  while [ true ]
  do
          read inp
          print " Re-enter selection: \c"
  done
  --------

  or called from a recursive function:
  --------
  #!/bin/ksh
  function ov_get_input
  {
          read inp
          print " Re-enter selection: \c"
          ov_get_input
          return 0
  }

  print "  Which operation would you like to do: \c"
  ov_get_input
  --------

I've tested this out and it should be noted that this does not depend
on multi byte character locale as this also happens within ISO-8859-1
and UTF-8 ...


     Werner

-- 
  "Having a smoking section in a restaurant is like having
          a peeing section in a swimming pool." -- Edward Burr
_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers

Reply via email to