Sponsored Content
Full Discussion: Date derivation
Top Forums Shell Programming and Scripting Date derivation Post 302770085 by help_scr_seeker on Thursday 14th of February 2013 11:44:23 AM
Old 02-14-2013
Code:
use strict;
use warnings;
use DateTime;
my $d = DateTime->now;
while ( $d->day_of_week != 6 ) {
    $d->subtract( days => 1 );
        }
        print $d->ymd;

I developed this code in perl. Unfortunately, the perl modules is not installed in the client server. So unable to use that :-(

I need some help in shell scripting.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

derivation of the name linux?

My friend told me Linux is called linux for little unix; I dont believe thats true and iwant to tell him hes wrong, i think its called linux cuz the guy who originaly made it's first name is linus, but b4 i go and correct him; i want to get the real answer so i dont look like a idiot, ty. (4 Replies)
Discussion started by: stealthdestroyr
4 Replies

2. Shell Programming and Scripting

Date One Week Ago From Given Date, Not From Current Date

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. UNIX for Dummies Questions & Answers

Delete a row from a file if one column containing a date is greater than the current system date

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

4. Shell Programming and Scripting

Check if a date field has date or timestamp or date&timestamp

Hi, In a field, I should receive the date with time stamp in a particular field. But sometimes the vendor sends just the date or the timestamp or correctl the date&timestamp. I have to figure out the the data is a date or time stamp or date&timestamp. If it is date then append "<space>00:00:00"... (1 Reply)
Discussion started by: machomaddy
1 Replies

5. Shell Programming and Scripting

Converting a date to friday date and finding Min/Max date

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)
Discussion started by: 2001.arun
10 Replies

6. Programming

Derivation of values falling on date ranges

Hi Guys, I am having below tables used in oracle bal ID BALANCE BAL_DATE 1 -11.71 01-JAN-05 00.00.00 1 -405.71 02-JAN-05 00.00.00 1 -760.71 03-JAN-05 00.00.00 ref_table PRODUCT EFF_FROM_DATE EFF_TO_DATE TYPE MIN_AMT MAX_AMT CHARGE 12 01-JAN-05 00.00.00 01-JAN-06... (6 Replies)
Discussion started by: rohit_shinez
6 Replies

7. Shell Programming and Scripting

Date: invalid date trying to set Linux date in specific format

i try to set linux date & time in specific format but it keep giving me error Example : date "+%d-%m-%C%y %H:%M:%S" -d "19-01-2017 00:05:01" or date +"%d-%m-%C%y %H:%M:%S" -d "19-01-2017 00:05:01" keep giving me this error : date: invalid date ‘19-01-2017 00:05:01' Please use CODE tags... (7 Replies)
Discussion started by: umen
7 Replies

8. UNIX for Beginners Questions & Answers

Compare date in .txt with system date and remove if it's lesser than system date

Can someone help me with the code wherein there is a file f1.txt with different column and 34 column have expiry date and I need to get that and compare with system date and if expiry date is <system date remove those rows and other rows should be moved to new file f2.txt . I don't want to delete... (2 Replies)
Discussion started by: Stuti
2 Replies

9. Answers to Frequently Asked Questions

Compare date in .txt with system date and remove if it's lesser than system date

I m working on shell scripting and I m stuck where in my .txt file there is column as expiry date and I need to compare that date with system date and need to remove all the rows where expiry date is less than system date and create a new .txt with update. (1 Reply)
Discussion started by: Stuti
1 Replies
CORELIST(1)						 Perl Programmers Reference Guide					       CORELIST(1)

NAME
corelist - a commandline frontend to Module::CoreList DESCRIPTION
See Module::CoreList for one. SYNOPSIS
corelist -v corelist [-a|-d] <ModuleName> | /<ModuleRegex>/ [<ModuleVersion>] ... corelist [-v <PerlVersion>] [ <ModuleName> | /<ModuleRegex>/ ] ... corelist [-r <PerlVersion>] ... corelist --diff PerlVersion PerlVersion OPTIONS
-a lists all versions of the given module (or the matching modules, in case you used a module regexp) in the perls Module::CoreList knows about. corelist -a Unicode Unicode was first released with perl v5.6.2 v5.6.2 3.0.1 v5.8.0 3.2.0 v5.8.1 4.0.0 v5.8.2 4.0.0 v5.8.3 4.0.0 v5.8.4 4.0.1 v5.8.5 4.0.1 v5.8.6 4.0.1 v5.8.7 4.1.0 v5.8.8 4.1.0 v5.8.9 5.1.0 v5.9.0 4.0.0 v5.9.1 4.0.0 v5.9.2 4.0.1 v5.9.3 4.1.0 v5.9.4 4.1.0 v5.9.5 5.0.0 v5.10.0 5.0.0 v5.10.1 5.1.0 v5.11.0 5.1.0 v5.11.1 5.1.0 v5.11.2 5.1.0 v5.11.3 5.2.0 v5.11.4 5.2.0 v5.11.5 5.2.0 v5.12.0 5.2.0 v5.12.1 5.2.0 v5.12.2 5.2.0 v5.12.3 5.2.0 v5.12.4 5.2.0 v5.13.0 5.2.0 v5.13.1 5.2.0 v5.13.2 5.2.0 v5.13.3 5.2.0 v5.13.4 5.2.0 v5.13.5 5.2.0 v5.13.6 5.2.0 v5.13.7 6.0.0 v5.13.8 6.0.0 v5.13.9 6.0.0 v5.13.10 6.0.0 v5.13.11 6.0.0 v5.14.0 6.0.0 v5.14.1 6.0.0 v5.15.0 6.0.0 -d finds the first perl version where a module has been released by date, and not by version number (as is the default). --diff Given two versions of perl, this prints a human-readable table of all module changes between the two. The output format may change in the future, and is meant for humans, not programs. For programs, use the Module::CoreList API. -? or -help help! help! help! to see more help, try --man. -man all of the help -v lists all of the perl release versions we got the CoreList for. If you pass a version argument (value of $], like 5.00503 or 5.008008), you get a list of all the modules and their respective versions. (If you have the "version" module, you can also use new-style version numbers, like 5.8.8.) In module filtering context, it can be used as Perl version filter. -r lists all of the perl releases and when they were released If you pass a perl version you get the release date for that version only. As a special case, if you specify the module name "Unicode", you'll get the version number of the Unicode Character Database bundled with the requested perl versions. EXAMPLES
$ corelist File::Spec File::Spec was first released with perl 5.005 $ corelist File::Spec 0.83 File::Spec 0.83 was released with perl 5.007003 $ corelist File::Spec 0.89 File::Spec 0.89 was not in CORE (or so I think) $ corelist File::Spec::Aliens File::Spec::Aliens was not in CORE (or so I think) $ corelist /IPC::Open/ IPC::Open2 was first released with perl 5 IPC::Open3 was first released with perl 5 $ corelist /MANIFEST/i ExtUtils::Manifest was first released with perl 5.001 $ corelist /Template/ /Template/ has no match in CORE (or so I think) $ corelist -v 5.8.8 B B 1.09_01 $ corelist -v 5.8.8 /^B::/ B::Asmdata 1.01 B::Assembler 0.07 B::Bblock 1.02_01 B::Bytecode 1.01_01 B::C 1.04_01 B::CC 1.00_01 B::Concise 0.66 B::Debug 1.02_01 B::Deparse 0.71 B::Disassembler 1.05 B::Lint 1.03 B::O 1.00 B::Showlex 1.02 B::Stackobj 1.00 B::Stash 1.00 B::Terse 1.03_01 B::Xref 1.01 COPYRIGHT
Copyright (c) 2002-2007 by D.H. aka PodMaster Currently maintained by the perl 5 porters <perl5-porters@perl.org>. This program is distributed under the same terms as perl itself. See http://perl.org/ or http://cpan.org/ for more info on that. perl v5.16.2 2013-08-25 CORELIST(1)
All times are GMT -4. The time now is 03:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy