Hi folks,
I have a text file that I need to parse, and I cant figure it out. The source is a report breaking down softwares from various companies with some basic info about them (see source snippet below). Ultimately what I want is an excel sheet with only Adobe and Microsoft software name and... (5 Replies)
Hi All,
Please find the sample file below:
NAME ID NUMBER
-------------------------------------------------------------------------------------------------- ---------
abcdefgheija;lksdf ... (13 Replies)
I have in a file
domain.com. 1909 IN A 1.22.33.44
domain.com. 1909 IN A 22.33.44.55
ns1.domain.com. 1699 IN A 33.44.55.66
ns2.domain.com. 1806 IN A 77.77.66.66
I need to "grep" or "awk" out the lines starting with domain.com. as follows.
domain.com. 1909 IN A 1.22.33.44
domain.com.... (3 Replies)
I am using Solaris, I want to print
3 lines before pattern match
pattern
5 lines after pattern match
Pattern is abcd to be searched in a.txt. Looking for the solution in sed/awk/perl. Thanks ..
Input File a.txt:
=================
1
2
3
abcd
4
5
6
7
8 (7 Replies)
I need to print the lines that do not match a pattern. I tried using grep -v and sed -n '/pattern/!p', but both of them are not working as I am passing the pattern as variable and it can be null some times.
Example
........ abcd......
.........abcd......
.........abcd......... (4 Replies)
Hi,
I have a simple problem but i guess stupid enough to figure it out. i have thousands rows of data. and i need to find match patterns of two columns and print the number of rows. for example:
inputfile
abd abp 123
abc abc 325
ndc ndc 451
mjk lkj... (3 Replies)
Hello Experts , require help . See below output:
File inputs
------------------------------------------
Server Host = mike
id rl images allocated last updated density
vimages expiration last read <------- STATUS ------->... (4 Replies)
I am trying to combine lines with these conditions:
1. First line starts with text of "libname VALUE db2 datasrc" where VALUE can be any text.
2. If condition1 is met then continue to combine lines through a line that ends with a semicolon.
3. Ignore case when matching patterns and remove any... (5 Replies)
Discussion started by: Wes Kem
5 Replies
LEARN ABOUT CENTOS
data::grove::parent
Data::Grove::Parent(3) User Contributed Perl Documentation Data::Grove::Parent(3)NAME
Data::Grove::Parent - provide parent properties to Data::Grove objects
SYNOPSIS
use Data::Grove::Parent;
$root = $object->root;
$rootpath = $object->rootpath;
$tied = $object->add_magic([ $parent ]);
$node = Data::Grove::Parent->new($hash [, $parent]);
$node_list = Data::Grove::ParentList->new($array [, $parent]);
DESCRIPTION
Data::Grove::Parent is an extension to Data::Grove that adds `"Parent"' and `"Raw"' properties to Data::Grove objects and methods for
returning the root node of a grove, a list of nodes between and including the root node and the current node, and a method that creates
parented nodes.
Data::Grove::Parent works by creating a Perl ``tied'' object that contains a parent reference (`"Parent"') and a reference to the original
Data::Grove object (`"Raw"'). Tying-magic is used so that every time you reference the Data::Grove::Parent object it actually references
the underlying raw object.
When you retrieve a list or a property of the Raw object, Data::Grove::Parent automatically adds magic to the returned list or node. This
means you only call `add_magic()' once to create the first Data::Grove::Parent object and then use the grove objects like you normally
would.
The most obvious use of this is so you don't have to call a `"delete"' method when you want to release a grove or part of a grove; since
Data::Grove and Data::Grove::Parent objects have no cyclic references, Perl can garbage collect them normally.
A secondary use is to allow you to reuse grove or property set fragments in multiple trees. WARNING: Data::Grove currently does not
protect you from creating your own cyclic references! This could lead to infinite loops if you don't take care to avoid them.
METHODS
$object->root()
$object->rootpath()
`"root()"' returns the root node if `$object' is a `"Data::Grove::Parent"' object. `"rootpath()"' returns an array of all the nodes
between and including the root node and `$object'.
$tied = $object->add_magic([ $parent ])
`"add_magic()"' returns a "Data::Grove::Parent" object with `$object' as it's `"Raw"' object. If `$parent' is given, that becomes the
tied object's parent object.
AUTHOR
Ken MacLeod, ken@bitsko.slc.ut.us
SEE ALSO perl(1), Data::Grove(3)perl v5.16.3 2003-10-21 Data::Grove::Parent(3)