|
From: | Botao Lee |
Subject: | Re: how do I do $*:q in bash shell |
Date: | Fri, 18 Jun 2004 09:27:52 -0700 |
On Thu, 17 Jun 2004, botao wrote:
Hi,
I have a tcsh script which has
exec $tool $*:q
I am trying to convert this into bash shell as
exec $tool $@
It does not work in some cases, ie
<script> "first arguemnt" "second argument"
in csh, $tool gets 2 argument; in bash $tool get 4 argument.
Can somebody help me on this?
Use "$@".
man bash:
Special Parameters
The shell treats several parameters specially. These parameters may
only be referenced; assignment to them is not allowed.
........
@ 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" ...
--
Chris F.A. Johnson http://cfaj.freeshell.org
=================================================================
Everything in moderation -- including moderation
[Prev in Thread] | Current Thread | [Next in Thread] |