Thanks Jim and Paul, Appreciate your inputs.
Sj.
On Wed, Feb 26, 2014 at 4:47 PM, Paul Johnson wrote:
> On Wed, Feb 26, 2014 at 03:59:40PM +0000, jet speed wrote:
> > Chaps,
> >
> > Any quick one liner code in perl were i can get rid off the before and
> > afte
Chaps,
Any quick one liner code in perl were i can get rid off the before and
after wwn each line for file as below
file
---
device name lz_09_red_e10 vsan 200
* fcid 0xef0013 [pwwn 50:00:00:00:99:00:66:7a]
* fcid 0xegg015 [pwwn 10:00:00:55:99:a8:d9:c4] [ pe-tgh10-hostb]
device name lz_09_
Thanks - Shaji, Uri and Shawn for your valuable inputs. Apprecaite it.
Cheers !
On Fri, Dec 13, 2013 at 3:33 PM, Uri Guttman wrote:
> On 12/13/2013 10:21 AM, Shaji Kalidasan wrote:
>
>> Greetings,
>>
>> Thanks a bunch Uri and Shawn for providing valuable inputs.
>>
>> Here is the optimized c
Dear All,
I have sample code below, i am trying print the matching array element
values sorted in the hash.
As you would notice only one of the array element "x1259" will print its
value "IDT" stored in the hash.
Please could you advice how can i get rest of the array elements matched in
the has
Chaps,
I am testing all your code one by one, Appreciate your time and detailed
inputs.
Many Thanks
Sj
On Fri, Aug 23, 2013 at 6:01 PM, Jim Gibson wrote:
>
> On Aug 23, 2013, at 9:06 AM, jet speed wrote:
>
> > Chaps,
> >
> > Please i need help on the regular ex
Chaps,
Please i need help on the regular expression, i have the sample code below.
I only want to match the entries from the array to the file and print the
matching line
for example if i only want to match fc3/23, in my code it prints both the
lines fc3/2 and fc3/23. How to restrict to exact mat
On Thu, Nov 15, 2012 at 10:06 PM, Chris Charley wrote:
>
>
> "jet speed" wrote in message news:CAG1VzcezebNiFar3YKep-
>
> What i am trying to do ?
>> I want to match the entries from file1.txt with file.txt, if matches then
>> print the key and value. some
On Thu, Nov 15, 2012 at 2:49 PM, jet speed wrote:
>
>
> On Thu, Nov 15, 2012 at 11:43 AM, Charles DeRykus wrote:
>
>> On Thu, Nov 15, 2012 at 2:46 AM, jet speed
>> > ...
>> > I was able to build the hash, however the file contains approx 10,000
>> &
On Thu, Nov 15, 2012 at 11:43 AM, Charles DeRykus wrote:
> On Thu, Nov 15, 2012 at 2:46 AM, jet speed
> > ...
> > I was able to build the hash, however the file contains approx 10,000
> > entries. but while i print the hash i get only approx 1300 lines or
> > key=&g
On Thu, Nov 15, 2012 at 8:46 AM, Dr.Ruud wrote:
> On 2012-11-15 03:07, Uri Guttman wrote:
>
> my %hash = read_file( 'file.txt' ) =~ /^(.+)\s*=>\s*(.+)$/mg ;
>>
>
> Trailing whitespace in the keys? Skipping empty values?
>
> my %kv= read_file( 'file.txt' ) =~ /^(.+?)\s*=>\s*(.*)/mg;
>
> an
Hi
Is there a way, i can build an %hash from a file as Input. Appreciate you
help with this.
file.txt
22:5a => 10.00.00.00.aa.56.9b.7a
32:9c => 10.00.00.00.aa.46.9b.33
a2:cc=> 10.00.00.00.aa.5a.9b.63
Thanks
Sj
Hi Shlomi, Appreciate your help, your loop works perfectly !.
On Tue, Nov 13, 2012 at 12:12 PM, Shlomi Fish wrote:
> Hi Jet Speed,
>
> On Tue, 13 Nov 2012 11:44:26 +0000
> jet speed wrote:
>
> > Hi All,
> >
> > I have a file with similar data, around 10,
Hi All,
I have a file with similar data, around 10,000 entries with similar format.
i need to extract the output in below format. I can match the WWN and push
into an arrray, however i am not sure how to reference the WWN to its
corresponding device displayDevNum as in the below format.
Any hel
Hi All,
i have a requirement to output of hash from a perl script into a CSV format.
Please could you advice what is the best perl module to achieve this.
Thanks
Sj
Great. Thanks Shekar !
On Fri, Oct 5, 2012 at 12:37 PM, Shekar wrote:
> 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
@match = ("6c7b00", "6d7b00", "6d9d8f", "6c6863", "6e6632");
>
>
> %abc = ('6c' =>'device1', '6d'=> 'device5', '6e'=> 'device3',
> '6g'=>'device9');
>
> f
Hi All,
I am trying to find the array elements in hash, if it matches then print
the hash value. Please help me to achieve this.
Note: array elements matches the first 2 characters of the hash keys.
@match = ("6c7b00", "6d7b00", "6d9d8f", "6c6863", "6e6632");
%abc = ('6c' => device1, '6d'=>d
Hi All,
i have an regx question. i have the array contents, now i want to remove
the first 2 characters (fc) of each element in the array and store it in a
second array ex: @array2
@array ="fc20/1, fc30/22, fc40/3, fc20/1";
output
@array2 ="20/1, 30/22, 40/3, 20/1";
please advice.
Thanks
Sj
Thanks Sholmi. Appreciate your help !. that's correct, i did make up the
syntax, bec's the actual program is in a different system, were i cannot
access mail.
Cheers
Sj
On Wed, Sep 5, 2012 at 12:10 PM, Shlomi Fish wrote:
> Hi jet speed,
>
> On Wed, 5 Sep 2012 11:47:4
Hi All,
I would like to print array1 with array2 as below ex:
output
---
abc-12 20/1
def-22 30/22
ghi-33 40/3
def-22 20/1
@array1 ="abc-12, def-22, ghi-33,abc-12,def-22";
@array2 ="20/1, 30/22, 40/3, 20/1";
i did try to map array1 to array2 elements, did'nt work.
%hash = map {$array1[
Excellent !!. Thanks Tim. Appreciate your help.
On Thu, Aug 23, 2012 at 12:22 AM, timothy adigun <2teezp...@gmail.com>wrote:
> Hi jet speed,
> I think is a lot better using hash or hash reference as implemented
> in perldsc to do this.
> Like so:
>
> #!/usr/bin/pe
Hi Rob,
Thanks for the detailed explanation. Appreciate it.
Yes, perfect. All the details are captured. i should be able to modify the
output from your code.
Thanks
Sj
On Wed, Aug 22, 2012 at 5:01 PM, Rob Coops wrote:
>
>
> On Wed, Aug 22, 2012 at 4:39 PM, jet speed wrote:
&g
Hi All,
Please advice me on now to capture the data below in the format as below.
i thought of using hash, but then the problem is each DisplayDevNum has
multiple WWN. some has 4 elements, some has 2. Any other method ?
Apprecaite your comments.
i want to caputre in the below format.
DisplayDe
Thanks John, worked as a treat. Appreciate it.
On Sun, Aug 19, 2012 at 11:18 PM, John W. Krahn wrote:
> jet speed wrote:
>
>> Hi All,
>>
>
> Hello,
>
>
> Is there a way to find matching array elements from hash.
>>
>> ex:
>>
>> @n
On Sun, Aug 19, 2012 at 10:48 PM, timothy adigun <2teezp...@gmail.com>wrote:
> Hi,
>
> Please, Check my comments below.
>
> On 8/19/12, jet speed wrote:
> > Hi All,
> >
> > Is there a way to find matching array elements from hash.
> >
> > ex:
Hi All,
Is there a way to find matching array elements from hash.
ex:
@names = ( abc. def. ghi, jky; );
%stud = (
" abc" =>" 34",
"nba" =>"99",
"def" =>"24",
"ghi"=> "33");
How can i go throught each elements of has %stud and print the matching
array value in this case
abc =34
def=24
Thank
AARA_30767_CL45
50:00:00:08:44:9a:fb:64:90
---
file: actzone.txt
zone:tstdetdr_B_AARA_30767_CL45
zone:artdetdr_B_AARA_30767_CL45
---
Thanks
Sj
On Fri, Aug 17, 2012 at 3:52 PM, Shawn H Corey wrote:
> On Fri, 17 Aug 2012 15:10:03 +0100
:AARA_30767_CL45
50:00:00:08:44:9a:fb:64:90
On Fri, Aug 17, 2012 at 1:21 PM, Shlomi Fish wrote:
> Hi jet speed,
>
> On Fri, 17 Aug 2012 12:10:47 +0100
> jet speed wrote:
>
> > Hi All,
> >
> > I have the below program. i can match the e
Hi All,
I have the below program. i can match the entries in actzone.txt file in
bluealias.txt and print it.
what i would like to achive is to print the alias name and the reated wwn
for each zone that matched in 2 formats in different file ex. as below.
Please could you help me achieve this.
o
Thanks Shawn, Appreciate your help !!
On Tue, Aug 14, 2012 at 12:57 PM, Shawn H Corey wrote:
> On Tue, 14 Aug 2012 11:50:14 +0100
> jet speed wrote:
>
> > i have an @newfa with 50:00:00:08:44:9a:fb:79:90
> > 50:00:00:90:44:9a:fb:30:90 50:00:00:55:44:9a:fb:79:66 and a fil
5:cd:16:ca
50:00:00:08:44:9a:fb:74:90
Thanks
Sj
On Tue, Aug 14, 2012 at 11:04 AM, Shlomi Fish wrote:
> Hi Sj,
>
> On Tue, 14 Aug 2012 10:55:13 +0100
> jet speed wrote:
>
> > Hi All,
> >
> > I have a file as below
> >
> >
Hi All,
I have a file as below
file.txt
5008449AFB7494
5008449AFB749C
5008449AFB779D
now i want to introduce : inbetween as below for each of these entries in
the file
50:00:00:08:44:9A:FB:74:90
i did come across join function in perl, not sure how to apply inbetween
each entries
Hi All,
Thanks for your time and valuable inputs, Appreciate it.
I will try your suggestions and test it in my program.
Sj
Hi All,
I need help in matching the regular expression, the file is as below.
I am trying to match number followed by Number ex 587, 128 in $1 and
60:06:01:60:42:40:21:00:3A:AA:55:37:91:8A:DF:11 in $2
the $1 match works find with regulare expression #if ($_=~
/\w{7}\s\w{4}\s\w{6}\s(\d{1,4})/i)
Excellent Guys, I would like thank each one of you for inputs. Much
appreciated.
i got blinded by just the numbers 0079, i didn't cater for the next line
which is hex 007A, as one of you rightly pointed out [ 0-9A-Z] , does the
trick. its amazing to see different technique to achieve the same res
(\d{4})\s[a-z]{1,3}\s[a-z]{1,7}\s*(\d{1,32})\b/i) {
push (@dev, $1);
push (@wwn, $2);
}
}
print "@dev \n";
print "@wwn \n";
./wwnmod.pl
0079
69729260057253303030373
Regards
Sj
On 4/27/11, Rob Dixon wrote:
> On 27/04/2011 11:47, jet speed wrote:
>>
Hi,
Please could you advice, how can i write a regular expression for the
line below to capture 0079 and 69729260057253303030373
0079 Not Visible 69729260057253303030373
i tried this one, no luck
/(^\d{4})\s\w+\s\w+\s+\d+/ig)
Appreciate your help with this.
Sj
-
Hi,
I need help in formatting ouput from system command, i could'nt figure out a
way to format output from system command. appreciate your help with this,
the details are below.
hlis3 is file with list of clients
hosta
hostb
hostc
hostd
The below program looks through each client and outputs t
Hi,
I need help in formatting ouput from system command, i could'nt figure out a
way to format output from system command. appreciate your help with this,
the details are below.
hlis3 is file with list of clients
hosta
hostb
hostc
hostd
The below program looks through each client and outputs t
On Fri, Jan 28, 2011 at 3:49 PM, Rob Dixon wrote:
> On 28/01/2011 15:26, jet speed wrote:
>
>> Hi All,
>>
>> I need help on this one please.
>>
>> I have a input file with the following data. The 7 times 000s i have added
>> in the input file in ord
Hi All,
I need help on this one please.
I have a input file with the following data. The 7 times 000s i have added
in the input file in order to start with 1808 as the eight element. which
works ok. am sure there is a better way.
now once i captre the 8th element ex: 1808, then 1810 so on in the
On Fri, Jan 21, 2011 at 5:35 PM, jet speed wrote:
>
>
> On Fri, Jan 21, 2011 at 5:18 PM, Jim Gibson wrote:
>
>> On 1/21/11 Fri Jan 21, 2011 8:43 AM, "jet speed"
>> scribbled:
>>
>> > Hi All,
>> > I need some help with the
Hi All,
I need some help with the blow.
I have a an input file with the below data
1835
1836
1837
1838
1839
183A
183B
183C
183D
#!/usr/bin/perl
use strict;
use warnings;
my $filename;
$filename = "input.txt" ;
open (FILE, "< $filename" ) or die "Could not open $filename: $!";
while () {
chomp
On Thu, Apr 1, 2010 at 5:58 PM, Shawn H Corey wrote:
> jet speed wrote:
>
>> Hi Chaps,
>>
>> I need bit more help with this, i slightly modified the code based on the
>> inputs, still having the same issue of $_ substitution.
>&g
r/bin/find "$_" -mtime 3 -exec ls -l '{}' \\\;)]
}
}
error output
/usr/bin/find: stat() error /usr/openv/netbackup/logs/bpcd
: No such file or directory
/usr/bin/find: stat() error /usr/openv/netbackup/logs/bprd
: No such fil
up/logs/bprd
: No such file or directory
#
Kindly let me know why this error.
Regds
Js
On Mon, Mar 29, 2010 at 4:35 PM, jet speed wrote:
> Many Thanks Simon, John and everyone else for pointing me to the correct
> direction. Cheeers !!
> Js
>
> On Fri, Mar 26, 2010 at 7:
Many Thanks Simon, John and everyone else for pointing me to the correct
direction. Cheeers !!
Js
On Fri, Mar 26, 2010 at 7:03 PM, Shlomi Fish wrote:
> On Friday 26 Mar 2010 20:51:17 John W. Krahn wrote:
> > jet speed wrote:
> > > Hi,
> >
> > Hello,
> &
Hi,
I have a simple code below,
###
#!/usr/bin/perl
use strict;
use warnings;
my @list =( '/usr/data/logs' , '/usr/data1/logs');
foreach (@list)
{
print "$_ \n";
system "(/usr/bin/find "$_" -mtime 3 -print -exec ls '{}' \;)";
}
###
On Fri, Aug 7, 2009 at 4:46 PM, Shawn H. Corey wrote:
> jet speed wrote:
>
>> Hi,
>>
>> I would like to join the $abc with ':' the final desired output 1:2:3:4:5
>>
>> #!/usr/bin/perl
>>
>> use strict;
>> use warnings;
>>
Hi,
I would like to join the $abc with ':' the final desired output 1:2:3:4:5
#!/usr/bin/perl
use strict;
use warnings;
my $abc = "1 2 3 4 5";
my $out = join ':', $abc;
print "$out";
executing the above, i get the same output 1 2 3 4 5, not sure were am going
wrong.
Any help on this would be
On Thu, Aug 6, 2009 at 11:49 AM, Telemachus wrote:
> On Thu Aug 06 2009 @ 11:19, jet speed wrote:
> > @array1 = ( D_101 D_102 D_103 D_104);
> > @array2 = (0 1 2 3);
> >
> >
> > How can i convert both of these arrays into %hash, assigining the
> >
Hi,
I have a query on converting arrays into hash.Please could you help me
resolve the below.
I have 2 arrays as bleow.
@array1 = ( D_101 D_102 D_103 D_104);
@array2 = (0 1 2 3);
How can i convert both of these arrays into %hash, assigining the
@array1 as keys and @array2 as values.
How can I
On Mon, Aug 3, 2009 at 5:45 PM, John W. Krahn wrote:
> jet speed wrote:
>
>>
>> Hi John, Thanks for your help, Much appreciated. Please could you also
>> refer any good reference for Regular expression for a beginer like me,
>> would
>> be great.
>>
On Mon, Aug 3, 2009 at 4:00 PM, John W. Krahn wrote:
> jet speed wrote:
>
>> Guys,
>>
>
> Hello,
>
> I am new to perl, I am having trouble capturing the required output from
>> the command, with my limited knowlege i tried to put something togather.
Guys,
I am new to perl, I am having trouble capturing the required output from
the command, with my limited knowlege i tried to put something togather. not
sure how to proceed beyond.
What i am trying to achieve
for certain drives ex : B3494_901, B3494_102 from the outputlist is to find
the ind
On 7/14/08, Rob Dixon <[EMAIL PROTECTED]> wrote:
>
>
> jet speed wrote:
> >
> > I put togather few lines of code, I am looking to achieve the below
> >
> > dir1 with file1, file2
> > dir2 with file1, file2
> >
> > i want to copy the files
Hi All,
I put togather few lines of code, I am looking to achieve the below
dir1 with file1, file2
dir2 with file1, file2
i want to copy the files from each of the directory to a third directory
dir3 as file1, file2 from dir1 and rename the file1 as file3 and file2 as
file4 from the dir2.
dir
On 7/4/08, John W. Krahn <[EMAIL PROTECTED]> wrote:
>
> jet speed wrote:
>
>> Hi All,
>>
>
> Hello,
>
> I put togather a piece of code with some help, to capture the output as
>> below from a file "cxout1" as below. I am sure this can be writ
Hi Rob,
Great, Thanks for sorting this out, Much appericiated.
Cheers
Js
On 7/4/08, Rob Dixon <[EMAIL PROTECTED]> wrote:
>
> jet speed wrote:
> >
> > Great, Thanks it works. Perfect.
> >
> > I Will explore your recommendation for using seek File option. I
Hi Rob,
I think it finds the bit starting with CK, if matches it stores in $sl($1)
and finally prints the key value as.
keys %sl,
bec's all matches are same it strores only once. am i correct ? Pls correct
me if am wrong.
Many Thanks
Js
On 7/4/08, jet speed <[EMAIL PROTECTED]> wr
Hi Rob,
Great, Thanks it works. Perfect.
I Will explore your recommendation for using seek File option. I will read
some doc.
In your code, Pls explain what this piece of code does.
$sl{$1}++ if /\bID=(CK\w+)/i;
Many Thanks
Js
On 7/4/08, Rob Dixon <[EMAIL PROTECTED]> wrote:
>
&g
Hi All,
I put togather a piece of code with some help, to capture the output as
below from a file "cxout1" as below. I am sure this can be written in few
lines or even differnt way of getting the same out put with use of hash etc.
Kindly help me to optimize the code. Any help would be much apperic
Thanks Rob, Much appreciated
Sj
On 6/24/08, Rob Dixon <[EMAIL PROTECTED]> wrote:
>
> Dermot wrote:
> > Welcome,
> >
> >
> > 2008/6/24 jet speed <[EMAIL PROTECTED]>:
> >> Hi,
> >>
> >> I am beginner to perl,
> >>
Thanks Dermot, it gives me the required output. Much appreciated.
On 6/24/08, Dermot <[EMAIL PROTECTED]> wrote:
>
> Welcome,
>
>
> 2008/6/24 jet speed <[EMAIL PROTECTED]>:
> > Hi,
> >
> > I am beginner to perl,
> >
> > I have a file n
Hi,
I am beginner to perl,
I have a file name cxout and i want to capture just the LUN 415, LUN 815
into arrray & then print from the array. my idea is to capture different
element form this file and the print form the array. Any help would be much
appericated. my sample script looks as below.
65 matches
Mail list logo