Re: send email by /usr/bin/mail

2012-04-02 Thread Shekar
"unable to create the obj $!, $@.\n"; $sender->MailFile( { to => 'tou...@domain.com', subject => "Subject", msg => "MAIL BODY", replyto => 'youremai...@domain.com', file=> "PATH_TO_

Re: sort and count match in file

2012-04-15 Thread Shekar
' => 2, 'test:dom2' => 1, 'my:dom1' => 1, 'work:dom1' => 1, 'test:dom1' => 2, 'my:dom2' => 2 }; -- Cheers, Shekar On Sun, Apr 15, 2012 at 11:14 PM, Вячеслав Агапов wro

Re: sort and count match in file

2012-04-16 Thread Shekar
Thanks Uri, and Ruud for lightening up :) Cheers, Shekar On Mon, Apr 16, 2012 at 12:25 PM, Dr.Ruud wrote: > On 2012-04-16 07:58, Shekar wrote: > > next if (/^\s$/); >> > > You probably meant: > > next if /^\s*$/; # skip blank lines > > -- > Ru

Re: Recommended config/ini file module?

2012-05-02 Thread Shekar
You can try - Config::IniFiles too. Thanks, Shekar On Tue, May 1, 2012 at 7:19 PM, Manfred Lotz wrote: > On Tue, 1 May 2012 15:58:49 +0530 > Mohan L wrote: > > > On Tue, May 1, 2012 at 3:28 PM, Manfred Lotz > > wrote: > > > > > Hi there, > > >

Re: how to only read the files last 13 lines

2012-06-11 Thread Shekar
If you are on linux, try command ->tail -13 FILE_NAME -- Shekar On Tue, Jun 12, 2012 at 11:38 AM, lina wrote: > Hi, > > How to read the files last 13 lines, > > only process the data of the last 13 lines, ignore the head parts. > > Thanks with best regards, > &g

Re: insert in perl tk

2012-08-23 Thread Shekar
Try this. $t->insert("end", &gettime); -- Shekar On Fri, Aug 24, 2012 at 11:58 AM, Irfan Sayed wrote: > i have to call localtime () function to get the latest time everytime when > i print the lines using insert method > i mean , i need to print the latest time in

Re: insert in perl tk

2012-08-24 Thread Shekar
Thanks for the correction Shlomi. Mistake from my side, i copy pasted the wrong line from my terminal !!! -- Shekar On Fri, Aug 24, 2012 at 2:49 PM, Shlomi Fish wrote: > Hi Shekar, > > On Fri, 24 Aug 2012 12:23:21 +0530 > Shekar wrote: > > > Try this. > > >

Re: Array elements in Hash

2012-10-04 Thread Shekar
Would this help. @match = ("6c7b00", "6d7b00", "6d9d8f", "6c6863", "6e6632"); %abc = ('6c' =>'device1', '6d'=> 'device5', '6e'=> 'device3', '6g'=>'device9

Re: Array elements in Hash

2012-10-05 Thread Shekar
Yes. Loop through the array, for each element get the first 2 characters using substr, then pass it to hash as key to get the corresponding value. -- Shekar On Fri, Oct 5, 2012 at 4:51 PM, jet speed wrote: > Hi Shekar, > > Appreciate your help, you saved me a lot of time ! >

Re: Test automation using perl or shell

2013-09-10 Thread Shekar
ell script which calls rest of the 50 shell programs to execute and record the results. -- Best Regards, Shekar On Tue, Sep 10, 2013 at 1:55 PM, Lalit Deshmukh wrote: > Hi, > > i have implemented 50 shell program to test. now i want to run all these > shell program one by one(in short

Re: how to create a LO spreadsheet

2015-04-29 Thread Shekar
I had some luck using this module. : https://metacpan.org/pod/Spreadsheet::WriteExcel Cheers, Shekar On Wed, Apr 29, 2015 at 12:53 AM, lee wrote: > Vincent Lequertier writes: > > > Le 2015-04-26 14:27, lee a écrit : > >> Hi, > >> > >> how can I cre

Re: configure a switch via ssh with a perl program

2016-07-04 Thread Shekar
Hi Lee, If you can login to your switch via ssh, run required commands on the switch and exit out, you should be able to simulate the same via Net::OpenSSH or Net::SSH::Perl Cheers, Shekar On Mon, Jul 4, 2016 at 8:18 PM, lee wrote: > Shlomi Fish writes: > > > Hi lee, > >

Re: how to repeatedly execute a command on a remote machine via a shh login from within a perl program capturing the output?

2017-04-19 Thread Shekar
+1 for SNMP, or if Net::SSH::Perl didn't help, can you try expect module? Cheers, Shekar On Wed, Apr 19, 2017 at 1:38 PM, lee wrote: > Duncan Ferguson writes: > > > If the temperature is available on your switch, can you not enable SNMP > on it and read the specific OID t

Re: how to repeatedly execute a command on a remote machine via a shh login from within a perl program capturing the output?

2017-04-19 Thread Shekar
OID's working. Cheers, Shekar On Thu, Apr 20, 2017 at 7:42 AM, lee wrote: > lee writes: > > > Shekar writes: > > > >> +1 for SNMP, or if Net::SSH::Perl didn't help, can you try expect > module? > > > > Thanks! 'Expect' isn'