Reputation: 149
I have tried this code for expecting "-bash-4.3$"
expect "-bash-4.3$"
But it does not work
Upvotes: 1
Views: 821
Reputation: 20797
You need to write expect -- -string
otherwise expect would think -string
is an option.
# expect -c 'expect -bash'
bad flag "-bash": must be -glob, [...], -timeout, -nobrace, or --
while executing
"expect -bash"
# expect -c 'expect -- -bash'
Upvotes: 3
Reputation: 1467
If it says
'no such file or directory'
then you are using it wrong!
You need to define a <testing_expect_script>.exp
and
execute it $ ./<testing_expect_script>.exp
You may use following actions to have your script do something -
Upvotes: 1