Bash Scripting - Variables
What will be the output of this script if run as
./script.sh apple banana?echo "$0" echo "$1" echo "$#" echo "$@"
./script.sh apple banana?echo "$0" echo "$1" echo "$#" echo "$@"
$0 is the script name with path: './script.sh', $1 is first argument 'apple', $# is number of arguments '2', $@ is all arguments 'apple banana'.$0=script name, $1=first arg, $#=arg count, $@=all args [OK]15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions