Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 10-21-2010, 12:21 AM
nasa_d nasa_d is online now
Registered User
 
Join Date: 10-20-2010
Posts: 3
Talking Telnet does not work very well

Telnet step does not have detailed documentation. I tried a simple rm file command and this says the script executed successfully but never worked. I used SSH mode. The version I tried is 7.7.

Please check if I need to do something else?
Reply With Quote
  #2  
Old 10-21-2010, 10:14 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
In our tests, the attached project produces the expected output of:

10/21/2010 9:08:09 AM: -------------------- Starting Build: 'SSH.bld' --------------------
10/21/2010 9:08:09 AM: Building project step 2 - Telnet...
Connecting to SSH server 'xxxxxxx.com' on port 22
Host key fingerprint: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

<= Received from server:
Last login: Wed Oct 13 12:27:59 2010 from 99.999.999.9
...
Erase set to backspace.
11:08AM up 17 days, 17:10, 1 user, load averages: 0.31, 0.33, 0.31
xxxxx@yyyy%

=> Sending to server:
dir

<= Received from server:
total 428
...
xxxxx@yyyy%

=> Sending to server:
echo test > xyz.txt

<= Received from server:
xxxxx@yyyy%

=> Sending to server:
dir

<= Received from server:
total 432
...
-rw-r--r-- 1 xxxx users 5 Oct 21 11:08 xyz.txt
xxxxx@yyyy%

=> Sending to server:
rm xyz.txt

<= Received from server:
xxxxx@yyyy%

=> Sending to server:
dir

<= Received from server:
total 428
...
xxxxx@yyyy%
Script successfully executed


http://www.kinook.com/Forum/showthre...?threadid=3044
Attached Files
File Type: bld ssh.bld (651 Bytes, 1589 views)
Reply With Quote
  #3  
Old 10-22-2010, 03:00 AM
nasa_d nasa_d is online now
Registered User
 
Join Date: 10-20-2010
Posts: 3
Thanks for the reply! I tried the shell script working after installing all the options.

But with respect to the response, I do not see the build handles very well. I need to handle the response in two scenarios.

1. To store the response in the macro
2. How to ignore or handle large chunck of response?

Thanks
Reply With Quote
  #4  
Old 10-22-2010, 09:33 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
The response will be available in the LASTSTEP_OUTPUT macro after the step completes.
http://www.kinook.com/VisBuildPro/Ma...stemmacros.htm

You can use the Read File action or script code to parse or filter the response contents.
http://www.kinook.com/VisBuildPro/Ma...fileaction.htm
http://www.kinook.com/VisBuildPro/Manual/script.htm

For complex scripts, it may be preferable to create a bash script and call that from the Telnet action rather than calling individual commands directly.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 04:19 AM.


Copyright © 1999-2023 Kinook Software, Inc.