expectã¨ã¯ LinuxãFreeBSDã§å©ç¨ã§ãããsshãSQLçã対話çãªéä¿¡ãèªååãããã¼ã«ã§ãã 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ãexpectã§å©ãã¦ã¡ã¼ã«éä¿¡ããã¹ãéä¿¡ãä½åãããã¨ã便å©ã #!/usr/bin/expect set timeout 5 spawn telnet somehost.example.com 25 expect "somehost.example.com" send
{{#tags}}- {{label}}
{{/tags}}