In a sample shell script, the command was -
. <sourced_file.sh> $*
What does the $*
mean?
Thanks.
$*
expands to all of the arguments that were given to the script in which it appears, or to the current shell function if it appears inside a function.
It's usually incorrect usage though, because it breaks arguments that contain spaces into multiple arguments. More correct is "$@"
which preserves the original arguments even if they have spaces in them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With