List Info

Thread: Error while executing unix commands using Net::Telnet




Error while executing unix commands using Net::Telnet
user name
2006-02-13 09:16:06
i had tried this code :

$obj = Net::Telnet->new("10.11.11.11");
$obj->login("csc","csccsc");
lines = $obj->cmd(String => "ls
-l");
print lines;

this was working fine and it was listing all the files in
the present
directory but when i tried

$obj = Net::Telnet->new("10.11.11.11");
$obj->login("csc","csccsc");
lines = $obj->cmd(String => "service
portmap restart");
print lines;

it gave the error -bash: servie: command not found

can i get some help ??? how do i rectify this error






Error while executing unix commands using Net::Telnet
user name
2006-02-13 09:31:05
I think you make a syntax error in second command;
Look once more, sure you write "servie portmap
restart" instead of
"service portmap restart"

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )