how to compare to arrays to check if each elements of the first are the same of the second?
for ((i=0;i<$LENGTH;i++)) ; do
for (j=0;j<$LENGTH;j++)) ; do
if [ ${ARR1} == ${ARR2[j]} ]
echo "Are the same";
fi;
done;
done;
i try this but it doesn't work 
if i make this code doesn't work:
A=${ARR1[@]};
B=${ARR2[@]};
if [ $A == $B ] ; then
echo "Are the same" ;
fi;
error is :
./script: line 3: [: too many arguments
why???
I solved with this code:
A=${ARR1[@]};
B=${ARR2[@]};
if [ "$A" == "$B" ] ; then
echo "Are the same" ;
fi;