Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com From: "Hannu E K Nevalainen" <_garbage_collector_ AT telia DOT com> To: Subject: RE: read command available? Date: Wed, 18 Aug 2004 15:14:27 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit In-Reply-To: <20040818123502.84272.qmail@web60405.mail.yahoo.com> X-IsSubscribed: yes "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/