there is one name 4 for command-line-parameters in shell script
please i only ask for the name for all parameters given to a shell-script; $1 means the first, $2 the second and so on . Is it $?, $#, $~ or what? I dont remember. I thanks a lot 4 all helping answer. An internet adress for looking in a table, a tutorial or something else would be enough.
jem |
http://answers.oreilly.com/topic/149...ell-variables/
$* is probably what you're looking for. |
Member Response
Hi,
For bash you can learn from; Bash Beginners Guide Bash Reference Manual Advanced Bash-Scripting Guide Another good guide; Linux Newbie Admin Guide |
Actually, you'll usually want to use "$@".
It expands to the entire list of arguments, and when quoted each argument is treated as a separate element. This is the behavior you'll usually want when running loops and passing the arguments to other commands. "$*", on the other hand, expands to the entire list of arguments as a single text string. You'll only want to use this in certain printing and testing situations. Note that the quotes are important for protecting the contents against shell word-splitting in either case, so never forget to quote. http://mywiki.wooledge.org/Arguments http://mywiki.wooledge.org/WordSplitting http://mywiki.wooledge.org/Quotes The "@" and "*" values work the same way when used as array indexes as well. |
All times are GMT -5. The time now is 02:01 AM. |