09-12-2018
Hi Ravindra
Thanks for quick reply.
Actual "post" is also a dummy keyword.
I have to run while loop for 20,000 such keywords.
Please share more generic solution.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a very large file and each line has a pattern and it is not position specific. I need to extract the string after the pattern
****MI* is the pattern in the red color
12 digit number is the sting value in the green color and it ends with ~
e.g.
... (1 Reply)
Discussion started by: gunaah
1 Replies
2. Shell Programming and Scripting
If the string is of the pattern XxxXyzAbc...
The expected out put from sed has to be Xxx Xyz Abc ...
eg: if the string is QcfEfQfs, then the expected output is Qcf Ef Efs.
If i try to substitute the pattern with space then the sed will replace the character or pattern with space,... (1 Reply)
Discussion started by: frozensmilz
1 Replies
3. Shell Programming and Scripting
Hello,
I have this sentence :Pattern1 Pattern2 Pattern3 Pattern4-which-contains-HELLO-string-and-other-stuff-and-second-HELLO-and-third-HELLO
I want to delete everything between the 3rd tab (\t) and the FIRST pattern "HELLO" of the line.
Result expected is : Pattern1 ... (7 Replies)
Discussion started by: theclem35
7 Replies
4. Shell Programming and Scripting
Hi,
I have got the below requirement. please suggest.
I have a file like,
Processing Item is:
/data/ing/cfg2/abc.txt
/data/ing/cfg3/bgc.txt
Processing Item is:
/data/cmd/for2/ght.txt
/data/kernal/config.klgt.txt
I want to process the above file to get the output file like,
... (5 Replies)
Discussion started by: rbalaj16
5 Replies
5. Shell Programming and Scripting
here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb
cat dump.sql
INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 Replies)
Discussion started by: vivek d r
10 Replies
6. Shell Programming and Scripting
I am trying to search a file for a patterns ERR- in a file and return a count for each of the error reported
Input file is a free flowing file without any format
example of output
ERR-00001=5
....
ERR-01010=10
.....
ERR-99999=10 (4 Replies)
Discussion started by: swayam123
4 Replies
7. Shell Programming and Scripting
'Hi
I'm using the following code to extract the lines(and redirect them to a txt file) after the pattern match. But the output is inclusive of the line with pattern match.
Which option is to be used to exclude the line containing the pattern?
sed -n '/Conn.*User/,$p' > consumers.txt (11 Replies)
Discussion started by: essem
11 Replies
8. Shell Programming and Scripting
The sample file:
dept1: user1,user2,user3
dept2: user4,user5,user6
dept3: user7,user8,user9
I want to match by '/^dept2.*/' but don't want to have substring 'dept2:' in output. How to compose such regex? (8 Replies)
Discussion started by: urello
8 Replies
9. Shell Programming and Scripting
The intended result should be :
PDF converters
'empty line'
gpdftext and pdftotext?xml version="1.0"?>
xml:space="preserve"><note-content version="0.1" xmlns:/tomboy/link" xmlns:size="http://beatniksoftware.com/tomboy/size">PDF converters
gpdftext and pdftotext</note-content>... (9 Replies)
Discussion started by: Klasform
9 Replies
10. Shell Programming and Scripting
I have a file like below.
2018.07.01, Sunday
09:27 some text 123456789 0 21 0.06 0.07 0.00
2018.07.02, Monday
09:31 some text 123456789 1 41 0.26 0.32 0.00
09:39 some text 456789012 1 0.07 0.09 0.09
09:45 some text 932469494 1 55 0.29 0.36 0.00
16:49 some text 123456789 0 48 0.12 0.15 0.00... (9 Replies)
Discussion started by: father_7
9 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)