#!/bin/bash cat textfile.txt |while read Name do sqlplus -s <a href="mailto:userid/password@db_name">userid/password@db_name</a> > output.log <<EOF set verify off set heading off select customerid from customers where customername like '%${Name}%'; / exit EOF