기술빙자사기

expect 명령어 이용 자동 실행 매크로

권성재 2008. 1. 13. 11:33
#!/usr/bin/expect  -f

set timeout 10
set fname [lindex $argv 0 ]

spawn exp userid=edu/edu01 file=$fname full=y
expect -nocase "sers"
send "2\n"
expect  "grants"
send "yes\r"
expect  "*table data*"
send "yes\r"
expect  "extents"
send "yes\r"
interact
exit 0