0

i'm new with expect. i wanted to ask how can i execute a command but without plot to the screen the command itself.

for example:

expect "*?>"
send "echo done"
expect "*?>"

without plotting to the screen "echo done" but ONLY "done".

Thank you.

Asfbar
  • 259
  • 6
  • 21
  • See http://stackoverflow.com/questions/14601526/hide-output-from-expect if that can help you. – konsolebox Jun 02 '14 at 13:08
  • no good since it hide all the output from screen i want to hide ONLY the command and not the command's output – Asfbar Jun 02 '14 at 13:12

1 Answers1

0

Try something like this:

if {[info exists tty_spawn_id]} {
    stty -echo
}

log_user 0

...

send_user "done"
bobah
  • 18,364
  • 2
  • 37
  • 70