I have problem with my simple code, the expect can not expect the outputset timeout 10set user usernameset password passwordspawn  ssh $user@000.000.000.000expect Password:send $password\rexpect eofsend cv mk ghassan-test-5\rsleep 45expect ok { send cv set ghassan-test-5\r }sleep 20expect -gl Ok { send cv rbset ghassan-test-5\r }expect eofsleep 20expect -gl Ok { send cv ls\r }sleep 10expect eof`send exit\rthe script run and and enter to the remote serverbut after send cv mk ghassan-test-5\r the output is generated, .....Please wait while database is writing to disk.Writing the database file can take minutes...ok, but when the script run the next line expect ok { send cv set ghassan-test-5\r } it did not run and did not expect the ok since the ok but if i expect minutes insted of ok it work fine (the ok appear after 1 minute)
Expect can not expect the output
expect