legacy-knowledge-base
公開されました Jul. 2, 2025

Gogoshell の lb コマンドの結果を記録する

written-by

Alfonso Abad

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

問題

  • Gogoshellで lb コマンドを実行した結果を.txtファイルに記録するにはどうすればよいでしょうか?

環境への配慮

  • DXP7.

決議

これは、Telnetでセッションを記録するスクリプトを作成することで実現します。 Gogoshell経由ではできない.

  • このようなスクリプトを作成します。
#!/usr/bin/expect

spawn telnet localhost 11311
set timeout 20

expect "g!"
send -- "lb\r"

expect "g!"
send -- "disconnect\r"

expect "Disconnect from console? (y/n; default=y)"
send -- "y\r"
  • dxplb.exp のように任意の名前で保存してください。
  • 実行権限を与える chmod a x dxplb.ext
  • この方法で実行してください。
​./dxplb.exp > results.txt

或いは

​./dxplb.exp | tee results.txt

追加情報

did-this-article-resolve-your-issue

legacy-knowledge-base