View Single Post

   
  #2 (permalink)  
Old 02-16-2008, 07:22 AM
Peter Strömberg
 
Posts: n/a
Default Re: Bug in ksh read command?

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
Reply With Quote