$ cat ./get_sqlresult.sh #!/bin/shvariable=`sqlplus -s / as sysdba << EOF set head off; select sys_context('USERENV','MODULE') from dual; exit; EOF ` echo ${variable} exit 0 $ ./get_sqlresult.sh sqlplus@it-tnga-ap.jp.oracle.com (TNS V1-V3)
![[Oracle]SQL*Plusで返ってきた結果をShellの変数に格納 | IT屋シミダイの頭の中](https://cdn-ak-scissors.b.st-hatena.com/image/square/db7ae9ae68730399814caf8329864187cb9dc3c9/height=288;version=1;width=512/https%3A%2F%2Flibproc.com%2Fwp-content%2Fuploads%2F2017%2F10%2Fbash-148836_1280.png)
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く