Is it possibile to send "Enter" in login scripts? [4]

Is it possibile to send "Enter" in login scripts?

Thursday, November 6, 2014 12:46 AM - Shepherd

Hi Experts,
Is it possibile to send an "Enter" in login scripts? The problem I meet while some expect sentence have line feed, and the "send string" is show on next line. So that I need to press "Enter" to complete that's rule.

Although I can avoid this problem by setting Initial VT Mode(New Line Mode), but that will cause another problem. While using that's mode, everytime we press "Enter" will show two line.

May you help me? Thanks in advance.

Program Ver. : Xshell 4


Re: Is it possibile to send "Enter" in login scripts?

Monday, November 10, 2014 2:04 AM - David

Login script sends enter when sending a command. Did you try waiting for '3' and send a blank space?


Re: Is it possibile to send "Enter" in login scripts?

Monday, November 17, 2014 1:20 AM - shepherd

Hi David,
"3" is send by my login scripts. When it meet the Expect "Please select the resource :", I will send "3".

The problem is while I send "3", it hang on there. I must press "Enter" by myself and it will go on.

So, is there any ideal to resolve it?
Thanks in advance.


Re: Is it possibile to send "Enter" in login scripts?

Monday, November 24, 2014 1:56 AM - Andrew

Did you try adding '\n' at the end of the command? This will add new line character.


Re: Is it possibile to send "Enter" in login scripts?

Sunday, December 7, 2014 11:14 PM - Shepherd

Hi David,
Thanks for your recommendation, it's work.


Previous views: 235