I have an array say
array_name=( XXX YYY ZZZ aaa bbb ccc)
and I want to get Index of aaa
. Is there any function or a simple way, other than looping, to get Index of an element of an array.
I don't want to use loop, since it is a part of a larger program and looping will really make it complex
I'm using GNU bash, version 3.2.33(1)-release (i386-redhat-linux-gnu)