hi guys i have a problem here, im trying to stablish a relationship between a text file and an input user for example the script is going to prompt the user for some football team and what the script is going to do is return the colums in which that input is located so far this is what i have ... (6 Replies)
Hi,
I have a question with sed/awk. When I handle some log files I want to search all reports with specified keyword. For example, in the log below.
abcd
efg
===start
abc
e
===end
xyz
===start
af
f
===end
nf
ga
===start
ab
===end (4 Replies)
Dear All,
I have a file containing info like
TID:0903 asdfasldjflsdjf
TID:0945 hjhjhkhkhkh
TID:2045 hjhjhkhkhkh
TID:1945 hjhjhkhkhkh
TID:2045 hjhjhkhkhkh
I need to show only lines containing
TID:0903 asdfasldjflsdjf
TID:0945 hjhjhkhkhkh
TID:2045 hjhjhkhkhkh
TID:2045 hjhjhkhkhkh
... (11 Replies)
I have a file (DCN.txt) that has about 35000 lines. It looks like:
10004470028
10005470984
10006470301
10007474812
....
I have several other files (a11.txt, a12.txt, a12_1.txt, a13.txt, etc. about 70, each 100 mb large) that have history records like so:
LINE 10005470984 01/06/2010... (13 Replies)
hi dudes;
this is my file.txt:20101228-180436_Down
a 1
b 2
...
20101228-190436_Rollback
a 1 40
e 3 20
...
20101228-180436_Down
c 2
f 2
c 1
...
and i have a down.txt:a 1 aa 2 30 bb 1 40
b 2 ab 3 10
c 3 cd 4 50 ac 2 20
c 3 ad 1 0 (2 Replies)
Hi
i am running a issue with the way i handel open file in perl
i have the following input file <File1>
D33963|BNS Default Swap|-261564.923909249|
D24484|BNS Default Swap|-53356.6868058492|
D24485|BNS Default Swap|-21180.9904679111|
D33965|BNS Default Swap|154181.478745804|... (6 Replies)
Hello,
I need a shell script which takes search keyword as input and then searches logs in six different servers and provide me the logs where in it found the keyword.
Can anyone help???? (1 Reply)
What is the best way (bash/awk/sed?) to read in two text files and do a keyword search/replace?
file1.txt:
San Francisco
Los Angeles
Seattle
Dallas
file2.txt:
I love Los Angeles.
Coming to Dallas was the right choice.
San Francisco is fun.
Go to Seattle in the summer.
... (3 Replies)
Hi
I want to implement something like this:
if( keyword1 exists)
then
check if(keyword2 exists in the same line)
then replace keyword 2 with New_Keyword
else
Add New_Keyword at the end of line
end if
eg:
Check for Keyword JUNGLE and add/replace... (7 Replies)
Discussion started by: dashing201
7 Replies
LEARN ABOUT DEBIAN
parse::dmidecode::handle
Parse::DMIDecode::Handle(3pm) User Contributed Perl Documentation Parse::DMIDecode::Handle(3pm)NAME
Parse::DMIDecode::Handle - SMBIOS Structure Handle Object Class
SYNOPSIS
use Parse::DMIDecode qw();
my $decoder = new Parse::DMIDecode;
$decoder->probe;
for my $handle ($decoder->get_handles) {
printf("Handle %s of type %s is %s bytes long (minus strings).
".
" > Contians the following keyword data entries:
",
$handle->handle,
$handle->dmitype,
$handle->bytes
);
for my $keyword ($handle->keywords) {
my $value = $handle->keyword($keyword);
printf("Keyword "%s" => "%s"
",
$keyword,
(ref($value) eq 'ARRAY' ?
join(', ',@{$value}) : ($value||''))
);
}
}
DESCRIPTION METHODS
new
Create a new struture handle object. This is called by Parse::DMIDecode's parse() (and indirectly by probe()) methods.
raw
my $raw_data = $handle->raw;
Returns the raw data as generated by dmidecode that was parsed to create this handle object.
bytes
my $bytes = $handle->bytes;
address
my $address = $handle->address;
Returns the address handle of the structure.
handle
Alias for address.
dmitype
my $dmitype = $handle->dmitype;
type
Alias for dmitype.
description
my $description = $handle->description;
keywords
my @keywords = $handle->keywords;
Returns a list of keyword data pairs available for retreival from this handle object.
keyword
for my $keyword ($handle->keywords) {
printf("Keyword "%s" => "%s"
",
$keyword,
$handle->keyword($keyword)
);
}
parsed_structures
use Data::Dumper;
my $ref = $handle->parsed_structures;
print Dumper($ref);
Returns a copy of the parsed structures. This should be used with care as this is a cloned copy of the parsed data structures that the
Parse::DMIDecode::Handle object uses internally, and as such may change format in later releases without notice.
SEE ALSO
Parse::DMIDecode
VERSION
$Id: Handle.pm 976 2007-03-04 20:47:36Z nicolaw $
AUTHOR
Nicola Worthington <nicolaw@cpan.org>
<http://perlgirl.org.uk>
If you like this software, why not show your appreciation by sending the author something nice from her Amazon wishlist ?
<http://www.amazon.co.uk/gp/registry/1VZXC59ESWYK0?sort=priority>
COPYRIGHT
Copyright 2006 Nicola Worthington.
This software is licensed under The Apache Software License, Version 2.0.
<http://www.apache.org/licenses/LICENSE-2.0>
perl v5.10.1 2009-12-02 Parse::DMIDecode::Handle(3pm)