I need to extract the date part from the file name (20080221 in this ex) and compare it with the current date and delete it, if it is a past date.
$file = exp_ABCD4_T-2584780_upto_20080221.dmp.Z
really appreciate any help.
thanks
mkneni (4 Replies)
Hi everyone!
I know you can extract public keys from a keystore using the keytool command.
But what is the process to extract a private key from a jks keystore and import into another jks keystore using keytool?
Any guidance would be greatly appreciated! I can't seem to find anything, I do... (0 Replies)
consider a line from a file is stored in a variable called $var
i.e.
var=" KEY `controllingZoneId` (`controllingZoneId`),"
or it can be (i.e without comma at the end)
var="KEY `requestingUserId` (`requestingUserId`)"
here i need to extract KEY and 1st and 2nd word
i want to know how... (7 Replies)
Hi guys!
I'm new to scripting and I need to write a script in awk.
Here is example of file on which I'm working
ATOM 4688 HG1 PRO A 322 18.080 59.680 137.020 1.00 0.00
ATOM 4689 HG2 PRO A 322 18.850 61.220 137.010 1.00 0.00
ATOM 4690 CD ... (18 Replies)
Hi,
I have two sets of dates as below. Need to find the maximum of them.
14-Feb-2006 17:30,02-Feb-2006 14:46
14-Feb-2006 17:30,02-Feb-2006 14:46
14-Feb-2006 17:30,02-Feb-2006 14:46
23-May-2006 18:25,02-Feb-2006 14:46
13-Feb-2006 12:00,02-Feb-2006 14:46
23-May-2006 18:25,02-Feb-2006... (4 Replies)
Hello.
From command line, the command zypper info nxclient
return a bloc of data :
linux local # zypper info nxclient
Loading repository data...
Reading installed packages...
Information for package nxclient:
Repository: zypper_local
Name: nxclient
Version: 3.5.0-7
Arch: x86_64... (7 Replies)
Dear all,
I have 2 questions.
I have a file with many rows which has date of the format YYYYMMDD.
1. I need to change the date to that weeks friday date(Ex: 20120716(monday) to 20120720). Satuday/Sunday has to be changed to next week friday date too.
2. After converting the date to... (10 Replies)
Hi Experts ,
we have a CDC file where we need to get the latest record of the Key columns
Key Columns will be CDC_FLAG and SRC_PMTN_I
and fetch the latest record from the CDC_PRCS_TS
Can we do it with a single awk command.
Please help.... (3 Replies)
I am extracting a number of key/value pairs in awk using following:
awk '
/xyz_session_id/ {
n=index($0,"xyz_session_id");
id=substr($0,n+15,25);
a=$4;
}
END{
for (ix in a) { print a }
}'
I don't like this Index + substr with manually calculated... (5 Replies)
Discussion started by: migurus
5 Replies
LEARN ABOUT DEBIAN
cache::file::heap
Cache::File::Heap(3pm) User Contributed Perl Documentation Cache::File::Heap(3pm)NAME
Cache::File::Heap - A file based heap for use by Cache::File
SYNOPSIS
use Cache::File::Heap;
$heap = Cache::File::Heap->new('/path/to/some/heap/file');
$heap->add($key, $val);
($key, $val) = $heap->minimum;
($key, $val) = $heap->extract_minimum;
$heap->delete($key, $val);
DESCRIPTION
This module is a wrapper around a Berkeley DB using a btree structure to implement a heap. It is specifically for use by Cache::File for
storing expiry times (although with a bit of work it could be made more general).
See LIMITATIONS below.
CONSTRUCTOR
my $heap = Cache::File::Heap->new( [$dbfile] );
The heap constructor takes an optional argument which is the name of the database file to open. If specified, it will attempt to open the
database during construction. A new Cache::File::Heap blessed reference will be returned, or undef if the open failed.
METHODS
$h->open($dbfile)
Opens the specified database file.
$h->close()
Closes a previously opened heap database. Note that the database will be automatically closed when the heap reference is destroyed.
$h->add($key, $val)
Adds a key and value pair to the heap. Currently the key should be a number, whilst the value may be any scalar. Invokes 'die' on
failure (use eval to catch it).
$h->delete($key, $val)
Removes a key and value pair from the heap. Returns 1 if the pair was found and removed, or 0 otherwise.
($key, $val) = $h->minimum()
In list context, returns the smallest key and value pair from the heap. In scalar context only the key is returned. Note smallest is
defined via a numerical comparison (hence keys should always be numbers).
($key, $vals) = $h->minimum_dup()
In list context, returns the smallest key and an array reference containing all the values for that key from the heap. In scalar
context only the key is returned.
($key, $val) = $h->extract_minimum()
As for $h->minimum(), but the key and value pair is removed from the heap.
($key, $vals) = $h->extract_minimum_dup()
As for $h->minimum_dup(), but all the values are removed from the heap.
SEE ALSO
Cache::File
AUTHOR
Chris Leishman <chris@leishman.org>
Based on work by DeWitt Clinton <dewitt@unto.net>
COPYRIGHT
Copyright (C) 2003-2006 Chris Leishman. All Rights Reserved.
This module is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either expressed or implied. This program is free software;
you can redistribute or modify it under the same terms as Perl itself.
$Id: Heap.pm,v 1.6 2006/01/31 15:23:58 caleishm Exp $
perl v5.12.4 2011-08-05 Cache::File::Heap(3pm)