Hello I am trying to run a loop and get the details of a project. I have these projects in my work space. How do I loop over the SQL code?#!/bin/bash    workspace=$(sudo locate -r '/workspace$')    cd $workspace    echo  > ~/Desktop/workspace.txt    for projectName in `ls -d *`;    do        echo $projectName >> ~/Desktop/workspace.txt    done    cat workspace.txt | while read Name    sqlplus $1/$2 <<ENDOFSQL > ~/Desktop/$Name.txt    DESC PROJECTS;    SELECT ID_NAME, VALUE FROM PROJECTS WHERE ID_NAME='%${Name}%';    exit;    ENDOFSQL    echo TestingWhen I run it, I get the error./sql_parameters.sh: line 24: syntax error: unexpected end of file
SQLPLUS withing shell script loops
shell;scripting;sql
two things:while should be in this formwhile condition; do    your code from whiledonealso, make sure ENDOFSQL is from new line and there are no spaces between.