Answers for "how to print array bash"

1

bash print array

echo "${array[*]}"
Posted by: Guest on August-04-2020
0

how to print array bash

echo  ${resnew[0]} - first element
echo  ${resnew[1]}  - second element 


echo last : ${resnew[$(($res_len -1))]}  last element

echo last : ${resnew[        $(($res_len -1))                              ]}  last element
             ^resnew_array[  ^get value from varible by solving $res_len-1  ^array close
Posted by: Guest on August-21-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language