Re: shellscript-Problem
On Oct 07 2005 Enrico Weigelt <weigelt@metux.de> wrote:
> moin,
>
> mal eine kleine Shellscript-Frage:
>
> Ich möchte von einem shellscript aus ein anderes Programm
> starten und alle Parameter transparent durchreichen.
> Da denkt man natürlich sofort an $*. Allerdings gibts da
> ein Problem mit whitespaces in Parametern.
>
> Wie kann ich die trotz whitespaces durchreichen, ohne jetzt
> "$1" "$2" ... "$n" schreiben zu müssen ? (es sind richtig
> viele Parameter ...)
>
>From the bash manpage:
[...]
@ 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 $@
[...]
Hth -- Peter
--
Peter.Weiss@consol.de ConSol* Software GmbH
Phone +49 89 45841-100 Consulting & Solutions
Mobile +49 177 6040121 Franziskanerstr. 38
http://www.consol.de D-81669 München
Reply to: