|
#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"
| |
最近の日記
2025年01月29日
・ham/wsjtx
2025年01月27日
・wip/wsjtx 5.4.2
2025年01月25日
・ham/wsjtx
2025年01月15日
・今更 advent calendar
2025年01月12日
・金柑収穫
|