I need to print the argument number of which user types in. No matter what I do I always get just an empty line
echo "Give argument number"
read number
allV=$@
echo ${allV[$number]}
what is wrong with this few lines? Even if I start the script with a few arguments and I just manually write sth like"
echo ${allV[1]}
again all I get is an empty line.
allVdoes not create an array; therefore, indexing it like an array doesn't help. UseallV=( "$@" )andecho "${allV[$number]}".