Expect란?
Introduction : Expect is a tool for automating interactive applications such as telnet, ftp, passwd, fsck, rlogin, tip, etc. Expect really makes this stuff trivial. Expect is also useful for testing these same applications. And by adding Tk, you can also wrap interactive applications in X11 GUIs.
Expect can make easy all sorts of tasks that are prohibitively difficult with anything else. You will find that Expect is an absolutely invaluable tool - using it, you will be able to automate tasks that you’ve never even thought of before - and you’ll be able to do this automation quickly and easily.
출처:https://core.tcl-lang.org/expect/index
Telnet, FTP, SSH 등과 같은 응용 프로그램을 자동으로 상호작용하며 제어하기 위한 프로그램입니다.
국내에는 Expect를 많이 사용하지 않는지, 관련 자료들이 그리 많지 않네요…
그 중 제타위키에 Expect가 어떤건지 이해하기 좋은 예제들이 잘 정리되어 있습니다.(제타위키:expect)
Expect 설치
Expect는 Sourceforge.net에서 다운로드 가능하며, 리눅스에서는 간단하게 yum이나 apt로 설치 가능합니다.
#sudo apt install expect
Expect 도구들
Expect는 다양한 도구들을 제공합니다.
#sudo apt install expect-dev
- expect_autoexpect
- expect_decryptdir
- expect_kibitz
- expect_multixterm
- expect_rlogin-cwd
- expect_tknewsbiff
- expect_weather
- expect_autopasswd
- expect_dislocate
- expect_lpunlock
- expect_passmass
- expect_timed-read
- expect_tkpasswd
- expect_xkibitz
- expect_cryptdir
- expect_ftp-rfc
- expect_mkpasswd
- expect_rftp
- expect_timed-run
- expect_unbuffer
- expect_xpstat