The thing is that it overwrites in Result.txt and I only get the last query. How can I fix this?
#!/bin/sh
while read -r line
do
echo "'$line'"
sqlplus -s whatever/whatever <<-EOF
SPOOL Result.txt
SELECT * FROM ---- WHERE sol = '$line';
SPOOL OFF ;
exit;
EOF
done < evs.txt