タグ

関連タグで絞り込む (0)

  • 関連タグはありません

タグの絞り込みを解除

expectに関するfdearのブックマーク (2)

  • expect内でループ処理をする。 - TOYBOX

    Linux等のリモートサーバ上で自動的に処理をさせたい場合、expectを使うのが一般的です。 今回はexpectを使って、リモートサーバ側でwhileを使った処理をさせた時のメモです。 今回やりたかったことは、サーバAからサーバBにログインし、複数ノードにPingを打つ、というような処理です。 expectの構文はtcl文法 今までよく知らずに使っていましたが、expectはtcl文法を使っていたので、下記の書式でループを作ることができました。 while { 条件式 } { 処理 } 例) sshで入ったサーバから、192.168.1.0-128のノードにPingを打って抜ける。 こんな感じで出来ました。 #!/bin/bash SSHHOST=hoge001 password="hogehoge" PINGHOST="192.168.1." expect -c " spawn ssh

    expect内でループ処理をする。 - TOYBOX
    fdear
    fdear 2012/12/05
  • expectコマンドの使い方

    www.uetyi.mydns.jp is not accessible... Sorry. I do not know why this site is not working. If you know Administrator of this site, please contact directly. You may be able to see it in Google cache. For administrator ... MyDNS.JP did not received IP address from you over One week. Please check your notify system. If you restart notification of IP address, MyDNS.JP will apply your IP address to DNS

    fdear
    fdear 2012/12/05
  • 1