Does anyone know what character I can use in a Cisco IOS command script to send the ENTER command?

I'm trying to avoid using expect so I'm looking for a way to send the enter command in a IOS configuration script. For example if the "command clear line 1/0” is entered, the terminal prompts for confirmation, you need to press 'enter' to continue.

I've tried many different characters including '!' and the ASCII code for carriage return, with no luck. Does anyone know what character I can use in a Cisco IOS command script to send the 'enter' or "carriage return" command?

Thanks in advance.

Answers

  • I am not sure if this works, but have you tried a regex such as \r?

Sign In or Register to comment.