This is the mail archive of the cygwin 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: [BUG?] run.exe and pdflatex


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@cs.nyu.edu | igor@watson.ibm.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/


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