I have bash script in which I am passing number of arguments and want to get argument at index specified
#! /bin/bash
index=$1
echo "argument at index $1 is" $[$index]
./temp.sh 3 1 2 5 6
argument at index 3 is 3
but I want output like
argument at index 3 is 2