If you're using bash, it can do arrays. which should help - > a=(0 2 3 4 10 11 12 13 16 17 18 26 41 42 43 49 50 51 52 53 54 58) > b=4 > echo ${a["$b"]} 10 Cheers, Eugene On 28 February 2013 13:01, Adi Maron-Katz <[log in to unmask]> wrote: > 0 2 3 4 10 11 12 13 16 17 18 26 41 42 43 49 50 51 52 53 54 58 > --