|
#1
[Unix] /bin/sh の変数 $* と $@ の違い
- *
- Expands to the positional parameters, starting from one. When the expansion occurs within a double-quoted string it
expands to
a single field
with the value of each parameter
separated by the first character of the IFS variable, or by
a <space> if IFS is unset.
- @
- Expands to the positional parameters, starting from one.
When the expansion occurs within double-quotes, each posi-
tional parameter expands as
a separate argument.
If there
are no positional parameters, the expansion of @ generates
zero arguments, even when @ is double-quoted. What this
basically means, for example, is if $1 is ``abc'' and $2 is
``def ghi'', then "$@" expands to the two arguments:
"abc" "def ghi"
| |
最近の日記
2024年03月10日
・停電 (瞬電)
2024年03月03日
・the second try on bare-metal
・useradd
2024年02月29日
・opendkim and senmail
2024年01月24日
・chat/iam 0.0.8
2024年01月21日
・uselocale vs setlocale (textproc/R-readxl)
|