04-11-2012
Check 'Add_Delta_YMD' function from Date::Calc module. Its simple to use. You may have to install it, though. Doesn't come bundled with default installation of perl.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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)
Discussion started by: MKNENI
4 Replies
2. Shell Programming and Scripting
Hi all,
I've used various scripts in the past to work out the date last week from the current date, however I now have a need to work out the date 1 week from a given date.
So for example, if I have a date of the 23rd July 2010, I would like a script that can work out that one week back was... (4 Replies)
Discussion started by: Donkey25
4 Replies
3. Shell Programming and Scripting
i would like to know how to append current date in a filename with .tgz extension.
#!/usr/bin/perl
my $date = `date + %Y%m%d`;
system("sudo mv /tmp/nyucs01_config_backup.tgz /misc/nyucs01_config_backup_$date.tgz");
im getting this error message:
sh: line 1: .tgz: command not found (7 Replies)
Discussion started by: linuxgeek
7 Replies
4. UNIX for Dummies Questions & Answers
Hello gurus,
I am hoping someone can help me with the required code/script to make this work. I have the following file with records starting at line 4:
NETW~US60~000000000013220694~002~~IT~USD~2.24~20110201~99991231~01~01~20101104~... (4 Replies)
Discussion started by: chumsky
4 Replies
5. Shell Programming and Scripting
this is what i have to find the files modified within the past 24 hours
find . -mtime -1 -type f -print0 | xargs -0 tar rvf "$archive.tar"
however i need to save/name this archive as the current date (MM-DD,YYYY.tar.gz)
how do i doo this (1 Reply)
Discussion started by: bugenhagen_
1 Replies
6. Shell Programming and Scripting
I have a requirement as follows.
when i pass a date to the perl script, it has to calculate the current date - 8 months and output the date back to the shell script in date format (YYYY-MM-DD).
Current date - 8 months is not constant.. because leap year, and the months jan, mar, may,.... has... (4 Replies)
Discussion started by: kmanivan82
4 Replies
7. Shell Programming and Scripting
Hi
i have a file containg dates likebelow
4/30/2013
3/31/2013
4/30/2013
4/16/2013
4/30/2013
4/30/2013
5/30/2013
5/30/2013
4/30/2013
5/30/2013
5/30/2013
3/31/2013
now i want to compare the above dates with current date and i want to display the difference . (10 Replies)
Discussion started by: siva kumar
10 Replies
8. Shell Programming and Scripting
I am not able to fetch first date and last date previous month
date -d -1month +%Y-%m-%d
date -d -1month +%Y-%m-%d
I need two format dd-mm-yyy
previous month 01-03-2016
previous month 31-03-2016
and also only date 1 to 31
Aprriciate your replay (4 Replies)
Discussion started by: jagu
4 Replies
9. Linux
Hi,
My question is how to calculate the quarter end date according to the current date in shell script? (2 Replies)
Discussion started by: Divya_1234
2 Replies
10. UNIX for Beginners Questions & Answers
Hello All,
we what we call a parameter file (.txt) where my application read dynamic values when the job is triggered, one of such values are below:
abc.txt
------------------
line1
line2
line3
$$EDWS_DATE_INSERT=08-27-2019
line4
$$EDWS_PREV_DATE_INSERT=08-26-2019
I am trying to... (1 Reply)
Discussion started by: pradeepp
1 Replies
LEARN ABOUT DEBIAN
module::install::bundle
Module::Install::Bundle(3pm) User Contributed Perl Documentation Module::Install::Bundle(3pm)
NAME
Module::Install::Bundle - Bundle distributions along with your distribution
SYNOPSIS
Have your Makefile.PL read as follows:
use inc::Module::Install;
name 'Foo-Bar';
all_from 'lib/Foo/Bar.pm';
requires 'Baz' => '1.60';
# one of either:
bundle 'Baz' => '1.60';
# OR:
auto_bundle;
WriteAll;
DESCRIPTION
Module::Install::Bundle allows you to bundle a CPAN distribution within your distribution. When your end-users install your distribution,
the bundled distribution will be installed along with yours, unless a newer version of the bundled distribution already exists on their
local filesystem.
While bundling will increase the size of your distribution, it has several benefits:
Allows installation of bundled distributions when CPAN is unavailable
Allows installation of bundled distributions when networking is unavailable
Allows everything your distribution needs to be packaged in one place
Bundling differs from auto-installation in that when it comes time to install, a bundled distribution will be installed based on the
distribution bundled with your distribution, whereas with auto-installation the distibution to be installed will be acquired from CPAN and
then installed.
METHODS
o auto_bundle()
Takes no arguments, will bundle every distribution specified by a "requires()". When you, as a module author, do a "perl Makefile.PL"
the latest versions of the distributions to be bundled will be acquired from CPAN and placed in inc/BUNDLES/.
o bundle($name, $version)
Takes a list of key/value pairs specifying a distribution name and version number. When you, as a module author, do a perl Makefile.PL
the distributions that you specified with "bundle()" will be acquired from CPAN and placed in inc/BUNDLES/.
o bundle_deps($name, $version)
Same as "bundle", except that all dependencies of the bundled modules are also detected and bundled. To use this function, you need to
declare the minimum supported perl version first, like this:
perl_version( '5.005' );
o auto_bundle_deps
Same as "auto_bundle", except that all dependencies of the bundled modules are also detected and bundled. This function has the same
constraints as bundle_deps.
BUGS
Please report any bugs to (patches welcome):
http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Module-Install
AUTHORS
Audrey Tang <autrijus@autrijus.org>
Documentation by Adam Foxson <afoxson@pobox.com>
COPYRIGHT
Copyright 2003, 2004, 2005 by Audrey Tang <autrijus@autrijus.org>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2012-03-01 Module::Install::Bundle(3pm)