while IFS=# read -r process_id source destination type
do
echo "Process id: $process_id"
echo "Source: $source"
echo "Destination: $destination"
case "$type" in
2)
echo "Type is outbound: $type"
contact=$(sqlplus -s ${SQLPLUS_INFO} <<EOF
SET PAGESIZE 0
SELECT email FROM table WHERE partner = '${destination}';
exit
EOF
)
echo
echo ${contact}
echo
;;
根据上面的代码,如何将 $destination 中的值传递给查询?上面的示例不起作用,即使是其他示例:
SELECT email FROM table WHERE partner = '"${destination}"';
SELECT email FROM table WHERE partner = '$destination';