I have a scenario where I want to compare value of array1 and array2
echo "${array1[@]}"
gives me output1 : 12.12 10.1
echo "${array2[@]}"
gives me output2 : 12.12 10.1
how to compare array1 value with array2 like below
array1[0]=array2[0]
array1[1]=array2[1]
12.12 12.12
10.1 10.1
if matches then display
echo “success” or “FAIL”
Success – when all data in array1 matches with aray2 [index to index]
Fail – when index to index value does not match then fail