473,385 Members | 1,542 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Net::Telnet - Handling unix commands

Hi,

I have a perl script which uses Net::Telnet module to open a telnet session with my unix boxes, and executes lot of commands on those boxes.

As this module is implemented, when 'cmd' is used, this module waits for the 'prompt' to decide whether the command is finished or not. Now in case the 'timeout' is reached before the 'prompt' appears, the module directly throws error (even if the command might actually be running on the remote unix box!).

Is there any fool proof method that this module understands that the command is actually completed. Something similar to using 'ssh -l <user> <host> <command>'

This would come-out only after the command finishes on the remote host!.

Thanks,
Aug 28 '07 #1
3 2029
KevinADC
4,059 Expert 2GB
Have you tried setting the timeout? See the module documentation or details.
Aug 28 '07 #2
Of course we can change the timeout, but then that needs to be done for every command.

In Telnet module, we totally depend upon the value of 'prompt'. I want a more generic way by which i can fire the commands without worrying about the prompts and timeout!
Aug 28 '07 #3
KevinADC
4,059 Expert 2GB
Since using "timeout" is the only way I know of to do what you want I have no other suggestions to offer.

-Kevin
Aug 28 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Pete Johansen | last post by:
Hi Folks, This prompt statement has been a real pain in the the butt. I am using net::telnet(v3.03) to connect to a W2K box from a Solaris 2.6 box. I the output stream resulting from a 'dir'...
2
by: Vinay Gupta | last post by:
Hi, In a Perl to Tcl conversion project, I am planning to use the following Tcl extensions as a replacement for some Perl libraries. My development environment is Windows. Win32::OLE --> "DDE"...
1
by: kriz4321 | last post by:
Hi all, This is the code I use to login to any device.( I will not be able to see any window but it will be able to login to the device and give the command specified)... can you tell me what...
1
by: jyohere | last post by:
I want to login to a remote machine using Net::Telnet....then i want to move to a particular directory in that remote machine....after that i want to get a list of files under that directory....after...
0
by: shineyang | last post by:
Dear all: Who is kind to help me about the following problem. Why cannot log the remote node by using Net::Telent #################################### The following is normal to the process...
2
by: kriz4321 | last post by:
Hello all i am using net:telnet module to login to the remote machine and execute some commands and to collect some logs corresponding to the command given. After loging into the machine I do...
2
by: jane007 | last post by:
Hi everybody, Anybody who know how to use Net::Telnet module to execute my own script?Not only to execute system command. Please advise. Thanks.
21
by: poolboi | last post by:
hi guys, a question on net::telnet what does this module do? cos i have a telnet client that will be able to communicate with a database so is it true if i enter my ip address, username, and...
0
by: SteveBark | last post by:
Any pointers on this truly appreciated. I am using net::telnet to connect to a modem pool and then connect with a remote piece of kit. Everything works fine normally, however on occassions the...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.