forked from koalaman/shellcheck
-
Notifications
You must be signed in to change notification settings - Fork 0
SC2048
Vidar Holen edited this page Oct 4, 2015
·
3 revisions
cp $* ~/dir
cp "$@" ~/dir
$*
, unquoted, is subject to word splitting and globbing.
Let's say you have three arguments: baz
, foo bar
and *
"$@"
will expand into exactly that: baz
, foo bar
and *
$*
will expand into multiple other arguments: baz
, foo
, bar
, file.txt
and otherfile.jpg
Since the latter is rarely expected or desired, ShellCheck warns about it.
None.