I need to figure out the numeric representation of the previous month (in an automated monthly-running script) so that I may append it to a filename. I have tried statements such as variable=`date +%m -1` (and several variations) but with no success. I have also tried simply assigning the value... (3 Replies)
hi gurus!
i realize that my question shows my stupidness, but i need your help!
i have:
s_date=`date +%m-%d-%Y_%I%p`
variable and i need the same, but minus one hour..
what i made:
s_date=time(`date +%m-%d-%Y_%I%p`) - 3600
but i'm getting:
daily_exports.sh: line 20: syntax error near... (4 Replies)
Hi all,
I need the date subtraction fuctionality using shell commands.
For example:
date1:Wed Apr 5 08:35:21 IST 2006
date2:Tue Apr 4 10:35:44 IST 2006
I need the date subtraction result like " 22 hours 23 seconds".
Please guide me to complete this task.
Can you please help me ASAP.
... (3 Replies)
hi,
i set up a script on my server to do a particular task once files from an external system are ftpd in the format compaq_20100110 (YYDDMM). Interestingly, the source of ftp is sending the files in the format e.g 20100109 i.e. previous date and for some reason this fails.kindly see my script... (2 Replies)
Hallo all i am trying to execute this script ...............
But this is throwing the error......
use of uninitialized value in subtraction in at icd_convert.pl line 156
use of uninitialized value in subtraction in at icd_convert.pl line 157
use of uninitialized value in subtraction in at... (1 Reply)
HI gurus...
I have a PERL file that help me extract the date and time
of the file.
The format of this is: yyyymmddhhmmss.
Example:
20100430070935 (April 30 2010 07:09:35)
How can i subtract the acquired time from system's time..??
The answer... (6 Replies)
Hi
#!/bin/sh
month=`date +%m`
year=`date +%Y`
echo $month
a=02
# Retaining Data for Current and Previous Month
lmonth=`expr $month - $a`
if test "$lmonth" = "0"
then
lmonth=12
year=`expr $year - 1`
fi
echo $year
echo $lmonth
The output is (3 Replies)
Hello all .
I have two arrays.
${ARRAY_MOUNT_POINT_CAPACITY}
${ARRAY_MOUNT_POINT_CAPACITY}.
Whats the synatx of subtracting their values , placing them in variable V1 and then echoeing it ???
Ive tried expr and let ...gives me ./test_code.sh: difference: bad number (3 Replies)
Hello All,
I am a newbie to unix shell scripting and need to write a script that displays the difference between two variables that stores date value.
For example,
F1=`ls -ltr file1* | tail -1 |tr -s ' ' |cut -d' ' -f6,7,8`
F2=`ls -ltr file2* | tail -1 |tr -s ' ' |cut -d' ' -f6,7,8`
F1... (3 Replies)
Discussion started by: priyaa2010
3 Replies
LEARN ABOUT DEBIAN
net::dns::sec
SEC(3pm) User Contributed Perl Documentation SEC(3pm)NAME
Net::DNS::SEC - DNSSEC extensions to Net::DNS
SYNOPSIS
"use Net::DNS;"
The Net::DNS::SEC module implements a few class methods used by the other modules in this suite and a few functions that can be exported.
DESCRIPTION
The Net::DSN::SEC suite provides the resource records that are needed for DNSSEC (RFC 4033, 4034 and 4035). In addition the DLV RR, a clone
of the DS RR is supported (RFC 4431)
It also provides support for SIG0. That later is useful for dynamic updates using key-pairs.
RSA and DSA crypto routines are supported.
For details see Net::DNS::RR::RRSIG, Net::DNS::RR::DNSKEY, Net::DNS::RR::NSEC, Net::DNS::RR:DS, Net::DNS::RR::DLV, and see
Net::DNS::RR::SIG and Net::DNS::RR::KEY for the use with SIG0.
Net::DNS contains all needed hooks to load the Net::DNS::SEC extensions when they are available.
See Net::DNS for general help.
Utility function
Use the following construct if you want to use thos function in your code.
use Net::DNS::SEC qw( key_difference );
key_difference
$result=key_differnece(@a,@b,@result);
Fills @result with all keys in the array "@a" that are not in the array "@b".
Returns 0 on success or an error message on failure.
Class methods
These functions are inherited by relevant Net::DNS::RR classes. They are not exported.
algorithm
$value=Net::DNS::SEC->algorithm("RSASHA1");
$value=$self->algorithm("RSASHA1");
$value=$self->algorithm(5);
$algorithm=$self->algorithm();
$memonic=$self->algorithm("mnemonic");
The algorithm method is used to set or read the value of the algorithm field in Net::DNS::RR::DNSKEY and Net::DNS::RR::RRSIG.
If supplied with an argument it will set the algorithm accordingly, except when the argument equals the string "mnemonic" the method will
return the mnemonic of the algorithm.
Can also be called as a class method to do Mnemonic to Value conversion.
digtype
$value=$self->digtype("SHA1");
$value=$self->digtype(1);
$algorithm=$self->digtype();
$memonic=$self->digtype("mnemonic");
The algorithm method is used to set or read the value of the digest or hash algorithm field in Net::DNS::RR::DS and Net::DNS::RR::NSEC3
objects.
If supplied with an argument it will set the digetstype/hash algorithm accordingly, except when the argument equals the string "mnemonic"
the method will return the mnemonic of the digetstype/hash algorithm.
Can also be called as a class method to do Mnemonic to Value conversion, note however that it will then use the "Delegation Signer (DS)
Resource Record (RR) Type Digest Algorithms" and not the "DNSSEC NSEC3 Hash Algorithms" IANA registry. If you want to specifically get
access to the NSEC3 digest types then use a construct like:
bless $self, Net::DNS::RR::NSEC3;
$self->digtype("SHA1");
COPYRIGHT
Copyright (c) 2001-2005 RIPE NCC. Author Olaf M. Kolkman <olaf@net-dns.org>
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in
supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO
EVENT SHALL AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA
OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
SEE ALSO
http://www.net-dns.org/ <http://www.net-dns.org/>
perl(1), Net::DNS, Net::DNS::RR::KEY, Net::DNS::RR::SIG, Net::DNS::RR::DNSKEY, Net::DNS::RR::RRSIG, Net::DNS::RR::NSEC, Net::DNS::RR::DS,
Net::DNS::SEC::Private.
RFC4033, 4034 and 4035.
perl v5.12.4 2010-03-12 SEC(3pm)