I have a need to send CTRL + Z to a Cisco device via TCL and Expect Scripting in order to get a prompt so that the scripting can perform an operation on the device. An example would be that if the script finds the state to be:
--MORE--
If you are sitting at the console you can send CTRL+Z and you will get:
#:
How can I do this from an automated script. I have tried:
send "\u001A";
and
send "\x1A";
They seem to be ignored.
You should be able to find exactly what octal value your CTRL+Z has by using od (octal dump), and then sticking that in your script.
See a good explanation on how to determine that here:
http://expect.sourceforge.net/FAQ.html#q54
Other than that, I have to say that Vidiyal's suggestion (trying with Q instead of CTRL+Z) has merit, and is a lot simpler.