The thing is that it overwrites in Result.txt and I only get the last query. How can I fix this?#!/bin/shwhile read -r linedo  echo '$line'  sqlplus -s whatever/whatever <<-EOF  SPOOL Result.txt  SELECT * FROM ---- WHERE sol = '$line';  SPOOL OFF ;     exit;EOFdone < evs.txt
save output into a file from sqlplus query in ksh script
shell;files;sqlplus