In a sample shell script, the command was –
. <sourced_file.sh> $*
What does the $* mean?
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
$*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.