例 expect&ssh † sshで接続して、lsを実行。 #!/usr/bin/expect set timeout 5 spawn ssh somehost.example.com expect "password:" send "YOUR PASSWD\r" expect "Last login" send "ls\r" interact ↑ 例. expect&sendmail † sendmailをexpectで叩いてメール送信。テスト送信を何回もやるとき便利。 #!/usr/bin/expect set timeout 5 spawn telnet somehost.example.com 25 expect "somehost.example.com" send "helo somehost.example.com\n" expect "pleased to meet yo
[prev in list] [next in list] [prev in thread] [next in thread] List: secure-shell Subject: RE: sftp in shell script From: "Wilson, Richard E" <richard.wilson () eds ! com> Date: 2002-10-31 20:29:00 [Download RAW message or body] Gerhard, I don't know if there's a password option, but it would be easy to do with expect, something like: #!/usr/bin/expect # spawn sftp host_name expect "password prom
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く