shell交互入参:
####----####
function main{
echo "sqlplus username/passwd@ynsname"
read -p "please input username:"dbuser
read -p "please input passwd:"-s dbpwd
echo '*'
read -p "please input tnsname:"tnsname
sqlplus $dbuser/$dbped@$tnsname 1>my.log 2>&1 <<EOF!
@@db_install.sql;
exit;
EOF!
echo "please watch my.log to look up the result!"
}
export NLS_LANG=AMETICAN_AMETICA.SL32UTF8
main $@
####----####
浙公网安备 33010602011771号