To pass arguments to a shell script, we can simply list them after the script name, separated by space. For example:  ./myscript.sh arg1 arg2 arg3  Inside the script, we can access the arguments using the $1, $2, $3, etc. variables. For example:  #!/bin/bash
echo "Argument 1: $1"
echo "Argument 2: $2"
echo "Argument 3: $3" We can also use the $* and $@ variables to access all of the arguments as a single string or as separate strings, respectively.  For example:  #!/bin/bash
# Print all arguments as a single string
echo "All arguments: $*"
# Print all arguments as separate strings
echo "All arguments: $@"  We can also use the $# variable to get the total number of arguments passed to the script.  For example:  #!/bin/bash
echo "Total number of arguments: $#"