Xshell Forum

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

Last post: Sunday, December 7, 2014 11:14 PM by Shepherd, 4 reply

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

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

 
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
Monday, November 10, 2014 2:04 AM - David

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

 
Login script sends enter when sending a command. Did you try waiting for '3' and send a blank space?
Monday, November 17, 2014 1:20 AM - shepherd

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

 
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.
Monday, November 24, 2014 1:56 AM - Andrew

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

 
Did you try adding '\n' at the end of the command? This will add new line character.
Sunday, December 7, 2014 11:14 PM - Shepherd

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

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