This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: pipe connection problem in recent cvs release


"Ralf Habacker" <Ralf.Habacker@freenet.de> wrote:
> Okay, another try:
>
> habacker@BRAMSCHE ~
> $ sh -c "exec echo `ls $PWD`"
> CVS
>
> habacker@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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]