01-11-2019
In addition to what Robin has already said, we also need a clear English description of what you are trying to do.
It looks like you want to ignore every line of input that does not have "C" as the first character on the line and then look at the remaining lines in groups of three. If the first line of a group is not literally Identifier "Findme" and the second line of a group is not literally Name "Positive" and the third line of a group is not literally AGT_AUTO then that group should also be ignored.
If that is what you're trying to do, I don't understand why producing that output would be important to anyone. It would seem that just knowing how many times a group matched each of those lines in sequence might be much more useful.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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)
Discussion started by: saifurshaon
11 Replies
2. Shell Programming and Scripting
0,0 4,5 11 11 * /pkgs/roots/scripts/job_monitor.ksh
i have the requirement like,
for the first time(4) the script should have the input parameter as "Value1"
but the second time(5) it should have the input parameter as "Value2"
Can we achieve this using any cron options ? If yes, How..??... (2 Replies)
Discussion started by: vikram3.r
2 Replies
3. Shell Programming and Scripting
Hi Friends
I have the following input data in 2 columns.
SNo 1
I1 Value
I2 Value
I3 Value
SNo 2
I4 Value
I5 Value
I6 Value
I7 Value
SNo 3
I8 Value
I9 Value
...............
................
SNo N (1 Reply)
Discussion started by: ks_reddy
1 Replies
4. Shell Programming and Scripting
I have 9,000 + html files.
I am using the following to remove the content from a certain line up
for i in `ls`
do
sed '1,569d' $i > $i.bak
done
This will remove the unwanted formatting keeping the content I need which changes in each HTML file.
the problem I have now is that the... (2 Replies)
Discussion started by: deaconf19
2 Replies
5. Shell Programming and Scripting
I am currently trying to develop a script to connect to mulltiple servers, reading specifc data from log files on the servers and append the data from each file into a single tab delimited row. So, at the end I am planning to have a report with all the extracted data with each row per server. I am... (5 Replies)
Discussion started by: scriptingnewbie
5 Replies
6. UNIX for Dummies Questions & Answers
Hello,
I have been using the command below for file manipulation.
while read A B; do grep $f1; done < f2 > f3
So, if a certain string is found in f2 (for ex; DOG243435) and it is also present in f1, then print that string plus the contents of the line in which it was found onto f3.
... (6 Replies)
Discussion started by: verse123
6 Replies
7. UNIX for Dummies Questions & Answers
Hi all
:wall:
Can anyone advise how do I use ls to do a selective amd sorted listing of file that I want to have as below?
Am looking for files that are named as log_<nnnn>.txt, where <nnnn> are numeric, i.e. I want to have a listing sorted from the newest to the oldest of files that... (7 Replies)
Discussion started by: newbie_01
7 Replies
8. Shell Programming and Scripting
I have a text file in this format.
Group: AAA
Notes: IP : 11.11.11.11
#User xxxxxxxxx
#Password aaaaaaaaaaaaaaaa
Group: AAA
Notes: IP : 11.11.11.22
#User yyyyyyyyyyyyy
#Password bbbbbbbbbbbbb (8 Replies)
Discussion started by: anil510
8 Replies
9. Shell Programming and Scripting
Need help
Please help on how to write a script which can echo timestamp, size of subdirectories in a specific path from multiple Linux servers to a text file.
I can ssh with a common user to all the servers from a build box.
Basic idea what I had was:
ssh <commonuser>@<each box>
cd... (1 Reply)
Discussion started by: sudhichadaga
1 Replies
10. Shell Programming and Scripting
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)