"neal somos" wrote: > The read command is supposedly a shell builtin. > > Strangely enough, the first time I tried the > example given with ksh, I got the exact same response. > > However on later attempts, I got what was expected. > I find this odd. > > /bin/sh and bash both handle this just fine. > I can't speak for ksh, but maybe its time to > switch to a different shell? > > neal
This really is OT on this list, but as we've started... You have to be aware of some automatic optimizations, I'm not sure about ksh - but bash does some subshell'ing in this situation. The following DOES indicate that ksh shouldn't, but then you never know how up to date the man page is. -- man ksh excerpt -- Note: Some shells (but not this one) execute control structure commands in a subshell when one or more of their file descriptors are redi- rected, so any environment changes inside them may fail. To be portable, the exec statement should be used instead to redirect file descriptors before the control structure. -- and right after it -- ( list ) Execute list in a subshell. There is no implicit way to pass environment changes from a subshell back to its parent. /Hannu E K Nevalainen, B.Sc. EE - 59+16.37'N, 17+12.60'E --72--> ** mailing list preference; please keep replies on list ** -- printf("LocalTime: UTC+%02d\n",(DST)? 2:1); -- --END OF MESSAGE-- -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/