hello every body

i want to run cu via expect shell script. when i run my script, cu is
running and enter its cli. but when i enter a command (like ~s to set
variable) manually , this command doesn't execute and cu cli is closed and
bash return an error that this command is not valid.
this is my shell script:
#!/usr/local/bin/expect
set timeout 20
spawn cu -l /dev/ttyu0 -s 115200 -e
expect "Connected"
send "~s"
expect "~[]"
send "hardwareflow\n"
expect eof

and this is the output:

[root@zharf ~]# /usr/SAM/shell-scripts/runcu.sh
spawn cu -l /dev/ttyu0 -s 115200 -e
Connected
~[set] *all /  *i enter this command manually
[root@zharf ~]# all
bash: all: command not found
[root@zharf ~]#


i don't know what happened when i run cu via expect that doesn't  work
correctly. please let me know if you have any ideas.

yours,
SAM
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to