Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试执行以下操作:
sqlplus id/pw <<EOF ! for i in 1 2 3; do echo "$i"; done EOF
但不幸的是我变成了一个空输出
你能给我解决方案来获得输出 1 2 3
你试过了吗
for i in 1 2 3 do sqlplus id/pw <<< "$i" done
?
或者
printf '%s\n' "$i" | sqlplus id/pw
如果你不使用 Bash。