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 Message-ID: <044001c21b9b$628cf140$6132bc3e@BABEL> From: "Conrad Scott" To: "cygwin" References: <008b01c21b7a$0f2ef190$651c440a AT BRAMSCHE> Subject: Re: pipe connection problem in recent cvs release Date: Mon, 24 Jun 2002 17:22:50 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 "Ralf Habacker" wrote: > Okay, another try: > > habacker AT BRAMSCHE ~ > $ sh -c "exec echo `ls $PWD`" > CVS > > habacker AT BRAMSCHE ~ > $ bash -c "exec echo `ls $PWD`" > CVS > > .. oh, there should be more results , but at least it does not let sh/bash > crashing. > > No I'm completly confused. Does anyone an idea, where to look now ? I've no idea about your other issue (i.e. echo `basename $PWD`) as that works as expected on my machine (running latest CVS). With these examples here, the output is as expected. That is, if you do $ echo "`ls`" you'll get a list of files, on separate lines, while $ echo `ls` will put them all on the same line. Now, the exec is just going to execute the first line of input; so $ sh -c "exec echo `ls`" will only echo the first line of your ls output (as the `ls` is inside double quotes). Now: this might be connected to your other issue: does `basename $PWD` manage to generate a spare newline somehow before the expected output? BTW, typing "exec ..." at the command line will close the window, since the program being exec'd replaces the shell and so when it exits, there's nothing left running in the window. Pop! HTH // Conrad -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/