01-27-2009
updates only
Hi,
I have a file called Data-today.Txt that is updated every 5 minutes.
# cat '/root/Desktop/window/'`date +%b%Y`'/Data-'`date +%d%m%y`'.Txt' > /root/temp.txt
I want to read it every hour and findout the changes and process only those lines added since the last check.
I tried diff but did not get what I want.
At 9:56 A. M. the file looked:
This is line one
This is line two
At 10:00 A. M. I processed these two lines.
At 10:05 A. M. the original file will look like:
This is line one
This is line two
This is line three
at 11:00 A. M. I want to process only the newly added line i.e.
This is line three
Any help will be appreciated.
Regards,
Shantanu Oak
7 More Discussions You Might Find Interesting
1. AIX
I have a Unix based server running Sagitta and the server is giving me an error of 4b10004 and my research tells me this is an EPROM issue, which means the processor needs to be flashed or repaired. Once up and running where can I go to get updates for Unix? (1 Reply)
Discussion started by: crainer
1 Replies
2. UNIX for Advanced & Expert Users
Hi all,
I would like to perform multiple updates within a single database open and close.
Box: solaris
dB: informix
This is how i do perform for single update
dbaccess <dbname> -<<EOF
update table1 set col1=1 where col2=1
EOF
i have the col1 values in a file (some 1000 values)... (1 Reply)
Discussion started by: matrixmadhan
1 Replies
3. Red Hat
All,
I'm updating my redhat servers by directly connecting to internet (redhat network). After I connecting to the internet, I see some packages in package updater.I'm trying to do update but its stucking up when it is starting updating the server. Any ideas. Thanks (4 Replies)
Discussion started by: s_linux
4 Replies
4. UNIX for Dummies Questions & Answers
hello all
I Installed CenTOS 5.5 and i've Run yum update command
every thing went smoothly but i got the following error at the end
6:kdebase-3.5.4-21.el5.centos.1.i386: Insufficient space in download directory /var/cache/yum/updates/packages
* free 6.0 M
* needed 28 M
... (2 Replies)
Discussion started by: abu_shiahb
2 Replies
5. Fedora
Hi,
Im using Fedora version 23 (latest upgrade and upates). Currently to receive the updates, I use:
su -c 'yum update'
This works fine, but I get:
yum command has been deprecated, redirecting to '/usr/bin/dnf update'.
See 'man dnf' and 'man yum2dnf' for more information.
To... (1 Reply)
Discussion started by: Janning
1 Replies
6. Shell Programming and Scripting
This cmd will update the user's crontab with the quoted line.
But how to script the update using a previously stored variable?
crontab -l | awk '{print} END {print "* * * * * echo test >> /tmp/testing"}' | crontab
crontab -l | awk '{print} END {print "$storedvariable"}' | crontab
Does not... (3 Replies)
Discussion started by: gtsonoma
3 Replies
7. HP-UX
On Hp-ux,I'm not talking about security patches.But free products like SecureShell.
How to know if update is avaliable?On Solaris11 is possible using pkg update.
On hpux?Some tool to check for outdated products and tell if new version is avaliable?
---------- Post updated at 03:24 AM... (1 Reply)
Discussion started by: Linusolaradm1
1 Replies
LEARN ABOUT REDHAT
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 pro-
tect 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.8.0 2000-02-22 Data::Grove::Parent(3)