X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Date: Thu, 10 Jan 2008 18:21:32 -0500
From: Christopher Faylor <cgf-use-the-mailinglist-please@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: [BUG?] run.exe and pdflatex
Message-ID: <20080110232132.GA24083@ednor.casa.cgf.cx>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <fm5sat$o04$1@ger.gmane.org> <Pine.GSO.4.63.0801101505510.8742@access1.cims.nyu.edu> <fm62p7$frr$1@ger.gmane.org> <Pine.GSO.4.63.0801101700480.8742@access1.cims.nyu.edu> <4786A6B7.40705@upb.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4786A6B7.40705@upb.de>
User-Agent: Mutt/1.5.16 (2007-06-09)
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Note-from-DJ: This may be spam

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.

cgf

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

