I’m reading through my .bashrc and noticed the following
cd "$@" && some_other_function
What does the $@ mean exactly?
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 a list of quoted command line parameters. It is subtly different from"$*": given"$*"expands towhereas
"$@"expands toand
$*(or$@) expands tothat is, “
$*"produces a single string but"$@"replicates the original quoting ,$*loses the quoting.