Sponsored Content
Top Forums Shell Programming and Scripting How to get previous month files Post 94189 by savitha on Wednesday 28th of December 2005 02:59:38 AM
Old 12-28-2005
Thank you but i don't want to use any script again...

My main aim is to get a string called "200511" into variable when the its dec 2005
and "200512" when its jan 2006 and '200601' when its feb 2006.

once i get it i can issue mdelete *pervmonth*.xls ( i have to logon to a FTP site and delete files).

In this case i don't think there is an issue of feb not having 30th and 31. becasue on feb 1st all jan files will be deleted.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

file name using previous month

This has probably been asked 100 times, but I couldn't find any articles on point. I have a script that runs on the last day of every month at 11:30pm. If cats a number of input tables that were created the previous month (or earlier), combines them into one master file and erases the indivual... (1 Reply)
Discussion started by: beilstwh
1 Replies

2. Shell Programming and Scripting

Help, I need to get the last date of previous month

Hi, I'm new with Unix, I'm trying to get a last day of previous month with this format: %b %d %Y (example: Feb 25 2008). Here is what I have so far. #!/bin/ksh cur_month=`date +%m` cur_year=`date +%Y` prev_month=$(($cur_month-1)) # Check to see if this is January if then ... (11 Replies)
Discussion started by: sirrtuan
11 Replies

3. UNIX for Dummies Questions & Answers

How to get the previous month by using `date`

Hello, I'm new to shell scripting. We've develop a script which will grep a file on the search criteria, MON (Jan/Feb/Mar/etc). But we should set this sript in cron which will run on every first day of the month. The problem I'm having is, when I run the script, it is displaying the contents of... (7 Replies)
Discussion started by: suneelj
7 Replies

4. Shell Programming and Scripting

Function to get previous month

Can someone help me creating a function which will give me previous months. like for example if the date is 200902 and if i call my function and pass a parameter 2 i want to get 200812 as the answer. or if i pass 200902 with a parameter 7 then my function should give me the date as 200807. (1 Reply)
Discussion started by: Lincy
1 Replies

5. UNIX for Dummies Questions & Answers

print previous month (current month minus 1) with Solaris date and ksh

Hi folks month=`date +%m`gives current month Howto print previous month (current month minus 1) with Solaris date and ksh (7 Replies)
Discussion started by: slashdotweenie
7 Replies

6. UNIX for Dummies Questions & Answers

date command - getting previous month

Hi, On any given day, I want to capture the month that has gone by - said otherwise, how do I capture last month? expr date '+%m' - 1 Above expression is giving error. Please advise thanks ---------- Post updated at 09:28 AM ---------- Previous update was at 09:11 AM... (1 Reply)
Discussion started by: ab_2010
1 Replies

7. UNIX for Dummies Questions & Answers

Get the previous month from date

Hi All, I am using the below code to get the year and month from date: Below gives output like 201212. dt=`date '+%Y%m'` how do i get the previous month value(ie: subtract 1 from date) example output: dt=201211 Please help. :confused: (3 Replies)
Discussion started by: abhi_123
3 Replies

8. Shell Programming and Scripting

Help with getting last date of previous month and first date of previous 4th month from current date

I have requirment to get last date of previous month and the first date of previous 4th month: Example: Current date: 20130320 (yyyymmdd) Last date of previous month: 20130228 (yyyymmdd) First date of previous 4th month: 20121101 (yyyymmdd) In my shell --date, -d, -v switches are not... (3 Replies)
Discussion started by: machomaddy
3 Replies

9. Shell Programming and Scripting

How to copy the previous month files using shell script?

could you please assist the below query. i had written the below piece of code to copy the files from one directory to another. For current month files had been copied ,unfortunately the previous month files not copied. Please find the below directory structure:- ls -lrt total 1824... (2 Replies)
Discussion started by: venkat918
2 Replies
DateTime::Locale::nl_NL(3)				User Contributed Perl Documentation				DateTime::Locale::nl_NL(3)

NAME
DateTime::Locale::nl_NL SYNOPSIS
use DateTime; my $dt = DateTime->now( locale => 'nl_NL' ); print $dt->month_name(); DESCRIPTION
This is the DateTime locale package for Dutch Netherlands. DATA
This locale inherits from the DateTime::Locale::nl locale. It contains the following data. Days Wide (format) maandag dinsdag woensdag donderdag vrijdag zaterdag zondag Abbreviated (format) ma di wo do vr za zo Narrow (format) M D W D V Z Z Wide (stand-alone) maandag dinsdag woensdag donderdag vrijdag zaterdag zondag Abbreviated (stand-alone) ma di wo do vr za zo Narrow (stand-alone) M D W D V Z Z Months Wide (format) januari februari maart april mei juni juli augustus september oktober november december Abbreviated (format) jan. feb. mrt. apr. mei jun. jul. aug. sep. okt. nov. dec. Narrow (format) J F M A M J J A S O N D Wide (stand-alone) januari februari maart april mei juni juli augustus september oktober november december Abbreviated (stand-alone) jan. feb. mrt. apr. mei jun. jul. aug. sep. okt. nov. dec. Narrow (stand-alone) J F M A M J J A S O N D Quarters Wide (format) 1e kwartaal 2e kwartaal 3e kwartaal 4e kwartaal Abbreviated (format) K1 K2 K3 K4 Narrow (format) 1 2 3 4 Wide (stand-alone) 1e kwartaal 2e kwartaal 3e kwartaal 4e kwartaal Abbreviated (stand-alone) K1 K2 K3 K4 Narrow (stand-alone) 1 2 3 4 Eras Wide Voor Christus Anno Domini Abbreviated v. Chr. n. Chr. Narrow v. Chr. n. Chr. Date Formats Full 2008-02-05T18:30:30 = dinsdag 5 februari 2008 1995-12-22T09:05:02 = vrijdag 22 december 1995 -0010-09-15T04:44:23 = zaterdag 15 september -10 Long 2008-02-05T18:30:30 = 5 februari 2008 1995-12-22T09:05:02 = 22 december 1995 -0010-09-15T04:44:23 = 15 september -10 Medium 2008-02-05T18:30:30 = 5 feb. 2008 1995-12-22T09:05:02 = 22 dec. 1995 -0010-09-15T04:44:23 = 15 sep. -10 Short 2008-02-05T18:30:30 = 05-02-08 1995-12-22T09:05:02 = 22-12-95 -0010-09-15T04:44:23 = 15-09--10 Default 2008-02-05T18:30:30 = 5 feb. 2008 1995-12-22T09:05:02 = 22 dec. 1995 -0010-09-15T04:44:23 = 15 sep. -10 Time Formats Full 2008-02-05T18:30:30 = 18:30:30 UTC 1995-12-22T09:05:02 = 09:05:02 UTC -0010-09-15T04:44:23 = 04:44:23 UTC Long 2008-02-05T18:30:30 = 18:30:30 UTC 1995-12-22T09:05:02 = 09:05:02 UTC -0010-09-15T04:44:23 = 04:44:23 UTC Medium 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 09:05:02 -0010-09-15T04:44:23 = 04:44:23 Short 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 09:05 -0010-09-15T04:44:23 = 04:44 Default 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 09:05:02 -0010-09-15T04:44:23 = 04:44:23 Datetime Formats Full 2008-02-05T18:30:30 = dinsdag 5 februari 2008 18:30:30 UTC 1995-12-22T09:05:02 = vrijdag 22 december 1995 09:05:02 UTC -0010-09-15T04:44:23 = zaterdag 15 september -10 04:44:23 UTC Long 2008-02-05T18:30:30 = 5 februari 2008 18:30:30 UTC 1995-12-22T09:05:02 = 22 december 1995 09:05:02 UTC -0010-09-15T04:44:23 = 15 september -10 04:44:23 UTC Medium 2008-02-05T18:30:30 = 5 feb. 2008 18:30:30 1995-12-22T09:05:02 = 22 dec. 1995 09:05:02 -0010-09-15T04:44:23 = 15 sep. -10 04:44:23 Short 2008-02-05T18:30:30 = 05-02-08 18:30 1995-12-22T09:05:02 = 22-12-95 09:05 -0010-09-15T04:44:23 = 15-09--10 04:44 Default 2008-02-05T18:30:30 = 5 feb. 2008 18:30:30 1995-12-22T09:05:02 = 22 dec. 1995 09:05:02 -0010-09-15T04:44:23 = 15 sep. -10 04:44:23 Available Formats d (d) 2008-02-05T18:30:30 = 5 1995-12-22T09:05:02 = 22 -0010-09-15T04:44:23 = 15 EEEd (d EEE) 2008-02-05T18:30:30 = 5 di 1995-12-22T09:05:02 = 22 vr -0010-09-15T04:44:23 = 15 za Hm (HH:mm) 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 09:05 -0010-09-15T04:44:23 = 04:44 hm (h:mm a) 2008-02-05T18:30:30 = 6:30 PM 1995-12-22T09:05:02 = 9:05 AM -0010-09-15T04:44:23 = 4:44 AM Hms (H:mm:ss) 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 9:05:02 -0010-09-15T04:44:23 = 4:44:23 hms (h:mm:ss a) 2008-02-05T18:30:30 = 6:30:30 PM 1995-12-22T09:05:02 = 9:05:02 AM -0010-09-15T04:44:23 = 4:44:23 AM M (L) 2008-02-05T18:30:30 = 2 1995-12-22T09:05:02 = 12 -0010-09-15T04:44:23 = 9 Md (d-M) 2008-02-05T18:30:30 = 5-2 1995-12-22T09:05:02 = 22-12 -0010-09-15T04:44:23 = 15-9 MEd (E d-M) 2008-02-05T18:30:30 = di 5-2 1995-12-22T09:05:02 = vr 22-12 -0010-09-15T04:44:23 = za 15-9 MMd (d-MM) 2008-02-05T18:30:30 = 5-02 1995-12-22T09:05:02 = 22-12 -0010-09-15T04:44:23 = 15-09 MMdd (dd-MM) 2008-02-05T18:30:30 = 05-02 1995-12-22T09:05:02 = 22-12 -0010-09-15T04:44:23 = 15-09 MMM (LLL) 2008-02-05T18:30:30 = feb. 1995-12-22T09:05:02 = dec. -0010-09-15T04:44:23 = sep. MMMd (d-MMM) 2008-02-05T18:30:30 = 5-feb. 1995-12-22T09:05:02 = 22-dec. -0010-09-15T04:44:23 = 15-sep. MMMEd (E d MMM) 2008-02-05T18:30:30 = di 5 feb. 1995-12-22T09:05:02 = vr 22 dec. -0010-09-15T04:44:23 = za 15 sep. MMMMd (d MMMM) 2008-02-05T18:30:30 = 5 februari 1995-12-22T09:05:02 = 22 december -0010-09-15T04:44:23 = 15 september MMMMEd (E d MMMM) 2008-02-05T18:30:30 = di 5 februari 1995-12-22T09:05:02 = vr 22 december -0010-09-15T04:44:23 = za 15 september mmss (mm:ss) 2008-02-05T18:30:30 = 30:30 1995-12-22T09:05:02 = 05:02 -0010-09-15T04:44:23 = 44:23 ms (mm:ss) 2008-02-05T18:30:30 = 30:30 1995-12-22T09:05:02 = 05:02 -0010-09-15T04:44:23 = 44:23 y (y) 2008-02-05T18:30:30 = 2008 1995-12-22T09:05:02 = 1995 -0010-09-15T04:44:23 = -10 yM (M-yyyy) 2008-02-05T18:30:30 = 2-2008 1995-12-22T09:05:02 = 12-1995 -0010-09-15T04:44:23 = 9--010 yMEd (EEE d-M-yyyy) 2008-02-05T18:30:30 = di 5-2-2008 1995-12-22T09:05:02 = vr 22-12-1995 -0010-09-15T04:44:23 = za 15-9--010 yMMM (MMM y) 2008-02-05T18:30:30 = feb. 2008 1995-12-22T09:05:02 = dec. 1995 -0010-09-15T04:44:23 = sep. -10 yMMMEd (EEE d MMM y) 2008-02-05T18:30:30 = di 5 feb. 2008 1995-12-22T09:05:02 = vr 22 dec. 1995 -0010-09-15T04:44:23 = za 15 sep. -10 yMMMM (MMMM y) 2008-02-05T18:30:30 = februari 2008 1995-12-22T09:05:02 = december 1995 -0010-09-15T04:44:23 = september -10 yQ (Q yyyy) 2008-02-05T18:30:30 = 1 2008 1995-12-22T09:05:02 = 4 1995 -0010-09-15T04:44:23 = 3 -010 yQQQ (QQQ y) 2008-02-05T18:30:30 = K1 2008 1995-12-22T09:05:02 = K4 1995 -0010-09-15T04:44:23 = K3 -10 yyMM (MM-yy) 2008-02-05T18:30:30 = 02-08 1995-12-22T09:05:02 = 12-95 -0010-09-15T04:44:23 = 09--10 yyMMM (MMM yy) 2008-02-05T18:30:30 = feb. 08 1995-12-22T09:05:02 = dec. 95 -0010-09-15T04:44:23 = sep. -10 yyQ (Q yy) 2008-02-05T18:30:30 = 1 08 1995-12-22T09:05:02 = 4 95 -0010-09-15T04:44:23 = 3 -10 yyQQQQ (QQQQ yy) 2008-02-05T18:30:30 = 1e kwartaal 08 1995-12-22T09:05:02 = 4e kwartaal 95 -0010-09-15T04:44:23 = 3e kwartaal -10 yyyyMMMM (MMMM y) 2008-02-05T18:30:30 = februari 2008 1995-12-22T09:05:02 = december 1995 -0010-09-15T04:44:23 = september -10 Miscellaneous Prefers 24 hour time? Yes Local first day of the week maandag SUPPORT
See DateTime::Locale. AUTHOR
Dave Rolsky <autarch@urth.org> COPYRIGHT
Copyright (c) 2008 David Rolsky. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. This module was generated from data provided by the CLDR project, see the LICENSE.cldr in this distribution for details on the CLDR data's license. perl v5.18.2 2017-10-06 DateTime::Locale::nl_NL(3)
All times are GMT -4. The time now is 01:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy