[PLUG] Perl - Passing my script's arguments to another program

clydefrog at adnap clydefrog at adnap
Tue Mar 23 07:40:02 UTC 2004


On Mon, Mar 22, 2004 at 02:06:01PM -0800, Aaron Burt wrote:
> command "$@" > filename
>
> >From the BASH manpage (no RTFM implied, it's really, really long.)
> @   Expands to the positional parameters, starting from  one.
>     When the  expansion  occurs  within  double  quotes, each parameter
>     expands to a separate word.  That is, "$@" is equivalent to "$1"
>     "$2" ...   When there are no positional parameters, "$@" and $@
>     expand to nothing (i.e., they are removed).

Thanks! In the meantime I had cobbled together a perl regex to escape the
funny characters, but I knew that was a kludge. Now it's much better: a
wrapper bash script first calls metacam and then my script.

Thanks again,
Evan





More information about the PLUG mailing list