View Single Post

   
  #3 (permalink)  
Old 02-16-2008, 08:22 AM
dfeustel@mindspring.com
 
Posts: n/a
Default Re: Bug in ksh read command?

"Peter Str?mberg" <wilfried@spamcop.net> wrote:
> dfeustel@mindspring.com wrote in news:vCmog.6030$il.4542@trnddc03:
>
>> When the following construct is processed by ksh
>> running on OpenBSD 3.9 release (cd), a CR is left
>> appended to the end of $REPLY.
>> ...
>> Is this the expected behavior of ksh?
>> (My 1989 version of _The Kornshell says that the
>> newline is removed).

>
> CR (ascii 13) != newline (ascii 10)
>
> "Only" space, tab and newline are in $IFS
>
> That the tty line disipline usually converts CR input from keyboard to NL
> (stty icrnl) doesn't matter for files


What happens when the arguments are written to the console is that any
output following the argument with the appended CR is printed starting
at column 1, overwriting the data previously written to the line.
Definitely not the output appearance that I was expecting.
--
Using OpenBSD with or without X & KDE?
http://dfeustel.home.mindspring.com
Reply With Quote