View Single Post

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

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. That newline shows
up at the end of the last argument processed by
the C program mychk.


cat mesglog | while read
do
mychk $REPLY
done

Is this the expected behavior of ksh?
(My 1989 version of _The Kornshell says that the
newline is removed).

Thanks,
Dave Feustel

--
Using OpenBSD with or without X & KDE?
http://dfeustel.home.mindspring.com
Reply With Quote