{"url":"https://iww.hateblo.jp/entry/20130709/expect","title":"expect\u3067interact\u306f\u5371\u967a\u306a\u306e\u3067expect\u3092\u4f7f\u3046","blog_title":"\u63ee\u767a\u6027\u306e\u30e1\u30e2\uff12","provider_name":"Hatena Blog","categories":["Linux"],"height":"190","description":"interact\u306f\u5bfe\u8a71\u306b\u4f7f\u3046\u3082\u306e\u306a\u306e\u3067\u3001\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u3057\u3066\u304f\u308c\u306a\u3044\u3002 \u7121\u9650\u5f85\u3061\u306b\u306a\u3063\u305f\u3089\u3044\u3084\u306a\u306e\u3067\u3001\u30d0\u30c3\u30c1\u51e6\u7406\u3067\u306f\u4f7f\u308f\u306a\u3044\u3088\u3046\u306b\u3059\u308b\u3002 #!/usr/bin/expect -f log_user 0 set timeout 5 spawn ssh hoge@192.168.1.2 \"echo 10\u79d2\u5f85\u3064; sleep 10; ls\" expect { \"assword:\" { send \"password\\r\" } timeout { send_error \"\\nLOGIN TIMEOUT\\n\"; exit 1 } eof { send_error \"\\nLOGIN DISCONNECT\\n\";\u2026","blog_url":"https://iww.hateblo.jp/","version":"1.0","author_name":"iww","author_url":"https://blog.hatena.ne.jp/iww/","published":"2013-07-09 00:00:00","image_url":null,"provider_url":"https://hatena.blog","type":"rich","width":"100%","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fiww.hateblo.jp%2Fentry%2F20130709%2Fexpect\" title=\"expect\u3067interact\u306f\u5371\u967a\u306a\u306e\u3067expect\u3092\u4f7f\u3046 - \u63ee\u767a\u6027\u306e\u30e1\u30e2\uff12\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>"}