shell - decrypting a variable in a scripting environment of Linux -
what $@
in unix shell script signify. example:
a__job="$class $@"
where $class has java class file name. might meaning of
$@.
what did do? googled :) $@ seems complex query ir or maybe not know how search google special characters.
$@
value of arguments passed.
for example, if pass:
./script b c d
then "$@" equal "a" "b" "c" "d"
so looks purpose passe arguments passed script directly java program.
from bash manual:
@ expands positional parameters, starting one. when expansion occurs within double quotes, each parameter expands separate word. is, "$@" equivalent "$1" "$2" ... if double-quoted expansion occurs within word, expansion of first parameter joined beginning part of original word, , expansion of last parameter joined last part of original word. when there no positional parameters, "$@" , $@ expand nothing (i.e., removed).
Comments
Post a Comment