The following does not work. I am trying to substitue the FILE_NAME into my sql and then running it. The sql does not seem to translate the $FILE_NAME
for FILE_NAME in `ls -1`
do
my_count=$(sqlplus -s $DB_USER/$DB_PASSWORD <<END
set feed off
set pages 0
set head off
select count(*) from pload_audit
where filename='$FILE_NAME';
commit;
exit;
END)
echo "$my_count"
for FILE_NAME in `ls -1`
do
my_count=$(sqlplus -s $DB_USER/$DB_PASSWORD <<END
set feed off
set pages 0
set head off
select count(*) from pload_audit
where filename='$FILE_NAME';
commit;
exit;
END)
echo "$my_count"