I am trying to run the below code using for loop but i am getting syntax error. Please help.
Input Format: The first line of the input contains an integer N, indicating the number of integers. The next line contains N space-separated integers that form the array A.
read n
sum=0
for (( i=1; i<= "$n" ; i++ ))
do
read val
sum ^= $val;
done
echo $sum
Below is the error message
solution.sh: line 4: ((: i<= 1
: syntax error: invalid arithmetic operator (error token is "
")