delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/01/10/18:41:33

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Thu, 10 Jan 2008 18:40:38 -0500 (EST)
From: Igor Peshansky <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: cygwin AT cygwin DOT com
Subject: Re: [BUG?] run.exe and pdflatex
In-Reply-To: <20080110232132.GA24083@ednor.casa.cgf.cx>
Message-ID: <Pine.GSO.4.63.0801101839420.13638@access1.cims.nyu.edu>
References: <fm5sat$o04$1 AT ger DOT gmane DOT org> <Pine DOT GSO DOT 4 DOT 63 DOT 0801101505510 DOT 8742 AT access1 DOT cims DOT nyu DOT edu> <fm62p7$frr$1 AT ger DOT gmane DOT org> <Pine DOT GSO DOT 4 DOT 63 DOT 0801101700480 DOT 8742 AT access1 DOT cims DOT nyu DOT edu> <4786A6B7 DOT 40705 AT upb DOT de> <20080110232132 DOT GA24083 AT ednor DOT casa DOT cgf DOT cx>
MIME-Version: 1.0
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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
Note-from-DJ: This may be spam

On Thu, 10 Jan 2008, Christopher Faylor wrote:

> On Fri, Jan 11, 2008 at 12:13:59AM +0100, Sven K?hler wrote:
> >> bash -c "exec /bin/echo \$@" some arguments here
> >>
> >> and see what's printed; then read the bash man page for why this
> >> happens).
> >
> >Oh, that possibility was new to me.
> >
> >All i wonder, is why the "some" gets lost. Only "arguments here" is
> >printed. And actually i would like to argue, that "$@" instead of $@
> >should be used.
>
> Because, as on linux, the arguments are taken to be argv[0 - 2].
>
> bash -c "exec /bin/echo \"\$0\" \"\$@\""
>
> will get you all of the arguments.

Or, in other words, "read the bash man page for why this happens" (in
particular, the part that talks about the "-c" argument). :-)
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha AT cs DOT nyu DOT edu | igor AT watson DOT ibm DOT com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"That which is hateful to you, do not do to your neighbor.  That is the whole
Torah; the rest is commentary.  Go and study it." -- Rabbi Hillel

--
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/

- Raw text -


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