22 lines
392 B
Plaintext
22 lines
392 B
Plaintext
|
#!/usr/bin/expect -f
|
||
|
# ./sedispol.exp option policyfile outputfile
|
||
|
set option [lrange $argv 0 0]
|
||
|
set policyfile [lrange $argv 1 1]
|
||
|
set outputfile [lrange $argv 2 2]
|
||
|
set timeout 60
|
||
|
spawn sedispol $policyfile
|
||
|
expect "Command*:" {
|
||
|
send -- "f\r"
|
||
|
}
|
||
|
expect "Filename*:" {
|
||
|
send -- "$outputfile\r"
|
||
|
}
|
||
|
expect "Command*:" {
|
||
|
send -- "$option\r"
|
||
|
}
|
||
|
expect "Command*:" {
|
||
|
send -- "q\r"
|
||
|
}
|
||
|
expect eof
|
||
|
|