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';