Сегодня я играл с Expect/TCL и надеялся, что кто-нибудь скажет мне, почему приведенный ниже сценарий не работает:
: command not found
./expect3: line 3: send: command not found
#!/usr/bin/expect -f
send " we are going to open up a file for reading, ok? \n"
expect "ok"
set fileopen [open "/home/aaron/text.txt" "r"]
set a [read $fileopen]
send "i am expecting to see a string from the file here $fileopen"
close $fileopen
Обе команды send и close терпят неудачу, но другие сценарии, которые я написал с помощью команды spawn, похоже, работают нормально?