[Mono-list] Command line parsing

Etienne PIERRE etienne.pierre at thalesgroup.com
Wed Jan 31 07:51:11 EST 2007


On Wednesday 31 January 2007, Chris Seaton wrote:
> Ah yeah, I found the problem.
>
> I'm using a wrapper shell script to run mono on my program.
>
> #!/bin/sh
> mono foo.exe $@
>
> When I call the script with
>
> a "b c"
>
> $@ comes out as
>
> a b c
>
> Lots of people use these wrapper scripts, don't they? How should I be
> doing it?

You should be doing

#! /bin/sh

mono foo.exe "$@"


The "$@" will be replaced with the same parameters as you passed (you can have 
a look at bash's man page


Etienne PIERRE


More information about the Mono-list mailing list