Do you have a question? Post it now! No Registration Necessary. Now with pictures!
October 29, 2004, 12:21 am
rate this thread
i have a question regarding the usage of Net::Telnet cmd.
here is some of my code
$key = <STDIN>;
$dir = '/home';
my $telnet = Net::Telnet-> new
( Timeout => 30,
my @listing = $telnet-> cmd("cd $dir;/usr/bin/grep '$key' *");
here is my situation. in $dir, there are many text files, as much as
and i need to grep for $key in every file. sometimes i can get the
if the grep results is small. Otherwise, no results will be output if
the grep is big.
Anyway i can work around this or is there something i miss in the
code?. Is it better print to screen as the cmd executes using a while
loop? any suggestions is greatly appreciated thanks..