tcl - How to expect strings with leading '-' char in Expect script -


i have tried code expecting "-bash-4.3$"

expect "-bash-4.3$" 

but not work

you need write expect -- -string otherwise expect think -string option.

# expect -c 'expect -bash' bad flag "-bash": must -glob, [...], -timeout, -nobrace, or --     while executing "expect -bash" # expect -c 'expect -- -bash' 

Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -