Ant: Telnet is not working
I am trying the below Ant telnet task:
<telnet userid="uid" password="pass" server="${BT_Server}">
<read>/u01/appldev/devappl/po/11.5.0/reports</read>
<write>ls</write>
<read string="/u01/appldev/devappl/po/11.5.0/reports"/>
</telnet>
It will execute for infinite time afte开发者_开发问答r login to the remote server. Getting below message:
Buildfile: C:\Program Files\Java\apache-ant-1.8.1\build.xml
sql_compile:
[telnet] Unauthorised Access is Illegal
[telnet] login:
[telnet] uid
[telnet] Password:
I need to forcefully terminate the job by pressing ctrl+c. It is giving a message- "Terminate batch job (Y/N)?"
Solve the problem. Read actually wait for the text which is appearing at the UNIX prompt.
<telnet userid="uid" password="pass" server="${Server}">
<read>authorisation (Y/N)? :</read>
<write>y</write>
<read>to continue</read>
<write>\n</write>
<read>/export/home/appldev></read4>
<write>sh test_sql.sh "{$Release_Name}"</write>
<read string="DEV - uid@host:/export/home/appldev>"/>
</telnet>
精彩评论