mySqlScript " select * from ABC where name = ' jack ' " | \
awk '{
for(I = 1; I<= NFi++) {
printf("%s ",$ I);
}
} END { print}'
Attached is a sample mySqlScript for your reference:
if [ $# -ne 1 ]
then
echo " Usage:$ 0 \ " & lt; sql _ cmd & gt\""
/kloc-exit 0/
The ship does not bear the loading fee.
cmd=$ 1
Function sqlCmd {
login_info="$ 1 "
$ ORACLE _ HOME/bin/sqlplus-s " $ log in _ info " & lt; & lt!
Close the course
Turn off feedback
Set page size 0
Set the line size 1024
$ cmd
!
}
SqlCmd sql _ login id/SQL _ password