Command line arguments

Hi Mumshad,
I am very confused about some points you defined in command-line arguments.
first is I understand in the shell script of “create-and-launch-rocket” the variable mission_name=mars mission or any mission name will work, but if I defined the command-line arguments mission_name=$1 then how the system will know for which mission I am talking about.

This is very confusing, please help me to understand.

This is done in Linux out of the box, this is how bash works when you pass with the command like
create-and-launch-rocker jupiter then when bash is interpreting the script it takes into consideration all the arguments you passed when you ran the script, so it will save jupiter in $1 variable like mentioned in the video.

1 Like