Thank you for the codes above.
@Rinndalir: This works but I need values from the list of given values with 1800 as difference.
@Guttorm: This really works. But I am planning to give a range from 0 to 86400 with 1800 as difference. Can you please help me with that?
i.e., list = { 0 - 86400 }
so that $list will have values like 0,1800,3600, 5400,7200, ......., 86400.
Also it will be helpful if you explain the snippet. Like, i did not understand what echo ${list[$RANDOM ${#list[@]} ]} does
But it does give the result.
BR,Emlyn Jose