Computing.Net > Forums > Programming > Telenet via batch file

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Telenet via batch file

Reply to Message Icon

Name: nithya_1983
Date: June 2, 2008 at 14:42:09 Pacific
OS: xp
CPU/Ram: intel
Product: 2003
Comment:

HI,

I need to create a batch file which has to telnet to a unix server and run the .ksh.
this batch file i will call in my BI job before i run the job.

please share your thoughts, how i can do this...or if you have any sample code..pls provide me..


thx,
nithya



Sponsored Link
Ads by Google

Response Number 1
Name: Razor2.3
Date: June 2, 2008 at 15:18:20 Pacific
Reply:

Microsoft's Telnet does not use standard in/out. Because of this, using it in Command Scripts is near impossible.


0

Response Number 2
Name: ghostdog
Date: June 2, 2008 at 18:28:26 Pacific
Reply:

@OP, if you know a bit of Perl, or other languages, like Python/Ruby...you can use Telnet libraries provided by these tools to do your stuff, An example with Perl's Net::Telnet module


use Net::Telnet ();
$t = new Net::Telnet (Timeout => 10,
Prompt => '#\$ $/');
$t->open("server");
$t->login($username, $passwd);
@lines = $t->cmd("ksh_script.ksh");
print @lines;

for more information, see http://search.cpan.org/~jrogers/Net...

0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Telenet via batch file

Path via Batch File www.computing.net/answers/programming/path-via-batch-file/7923.html

Installing a Printer via Batch File www.computing.net/answers/programming/installing-a-printer-via-batch-file/17555.html

Reverse batch file needed www.computing.net/answers/programming/reverse-batch-file-needed/15328.html