|
#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"
| |
最近の日記
2026年02月28日
・my first script-fu
2026年01月29日
・Die Fledermaus at New National theatre 2026/01/29
2025年12月25日
・pbulk 11.99.3 (emacs30)
2025年11月22日
・crash dump
2025年10月25日
・recover from disk error
|