declare arrays
[root@test1 ~]# declare -a PROD[0]="items" PROD[1]="motels" PROD[2]="teen"
[root@test1 ~]# echo "${PROD[1]} "
motels
[root@test1 ~]# echo "${PROD[2]} "
teen
[root@test1 ~]# echo "${PROD[1]} "
motels
[root@test1 ~]# echo "${PROD[0]} "
items
[root@test1 ~]# echo $PROD --> by default showing array[0]
items
[root@test1 ~]# echo "${PROD[1]} "
motels
[root@test1 ~]# echo "${PROD[2]} "
teen
[root@test1 ~]# echo "${PROD[1]} "
motels
[root@test1 ~]# echo "${PROD[0]} "
items
[root@test1 ~]# echo $PROD --> by default showing array[0]
items
Comments
Post a Comment