delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/06/24/12:22:20

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
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" <Conrad DOT Scott AT dsl DOT pipex DOT com>
To: "cygwin" <cygwin AT cygwin DOT com>
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
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000

"Ralf Habacker" <Ralf DOT Habacker AT freenet DOT de> 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019