Sponsored Content
Full Discussion: Comparing two months
Top Forums UNIX for Advanced & Expert Users Comparing two months Post 47458 by Perderabo on Wednesday 11th of February 2004 06:32:02 AM
Old 02-11-2004
Use a case statement to convert month to numeric form.
 

9 More Discussions You Might Find Interesting

1. IP Networking

DNS Help - Been trying to do this for months

Ok someone has to be able to help me here. I have the latest webmin, and i have bind i have a domain name called thedigitaldream.co.uk i have one server, just one as im poor so the one server is gunna be the dns, email, web and ftp server. Its only for a small site anyway so it will... (16 Replies)
Discussion started by: matt2kjones
16 Replies

2. Shell Programming and Scripting

some months ego

Hi, how can I format date function to find n (n=1 to 11) months ego ? For exemple now we are in july and I want to have a variable presenting april. How should it be : month=`date +%b`????? Many thanks before. (8 Replies)
Discussion started by: big123456
8 Replies

3. UNIX for Advanced & Expert Users

Subtract 2 months from the date

I have the script which appends month and year to the name of the file. Now every time when I append the month-year combination I have to subtract 2 months from the current date and then append it, since we are sending our vendor 2 months prior worth of data eveytime. #! /usr/bin/ksh ... (5 Replies)
Discussion started by: mahekr2000
5 Replies

4. Shell Programming and Scripting

calculate 13 months ago

hi, I have a big file that contains datas since 4 years ago. I need re-create this file but just lines that are 13 months ago from today. see what I have: ( I have a file.ksh that calls this file.scl ok !!) ======== file.scl ================ /STATISTICS=stderr /STABLE /NODUPLICATES... (3 Replies)
Discussion started by: andrea_mussap
3 Replies

5. Shell Programming and Scripting

Delete 6 months old files

Hi, Iam trying to delete 6 months old files. Iam using the following script -ctime +190 -type f -exec echo rm {} \; Iam getting an error saying -ctime not found. (6 Replies)
Discussion started by: Sompalle Jalaja
6 Replies

6. Post Here to Contact Site Administrators and Moderators

All threads closed after 3 months

I routinely watch for threads that have been unanswered for some time. Recently a rule has been implemented to close threads older than 3 months, which is rather restrictive, because now the last few pages of the unanswered threads section cannot be replied upon, but more importantly eliminates the... (23 Replies)
Discussion started by: figaro
23 Replies

7. Shell Programming and Scripting

How to get date n months before in Unix?

Hi, I need the date n months before currrent date I need to store date in a varible say x and then get the date 6 month before and get the result in the format 25-Aug-2009 Please Advice (7 Replies)
Discussion started by: mad_man12
7 Replies

8. Shell Programming and Scripting

Naming number to months

Hi, I have many files of monthly means from model simulation such as 1,2,3,4.....12, corresponding to jan, feb, mar,....., dec. e.g. avg_1.nc, avg_2.nc, ............., avg_12.nc. i want to write a shell script such that it should conveet number into months and year such as..... (4 Replies)
Discussion started by: mahesh shinde
4 Replies

9. UNIX for Dummies Questions & Answers

Months difference between 2 dates

Hello, I would like to find out the number of months between two dates as below example. date 1 = 03-02-2016 date 2 = 15-11-2015 I need 04 as months difference. Any help on this is highly appreciated. Thanks, Keerti (3 Replies)
Discussion started by: keertis
3 Replies
CAL(1)							    BSD General Commands Manual 						    CAL(1)

NAME
cal, ncal -- displays a calendar and the date of easter SYNOPSIS
cal [-jy] [[month] year] cal [-j] -m month [year] ncal [-jJpwy] [-s country_code] [[month] year] ncal [-Jeo] [year] DESCRIPTION
The cal utility displays a simple calendar in traditional format and ncal offers an alternative layout, more options and the date of easter. The new format is a little cramped but it makes a year fit on a 25x80 terminal. If arguments are not specified, the current month is dis- played. The options are as follows: -J Display Julian Calendar, if combined with the -e option, display date of easter according to the Julian Calendar. -e Display date of easter (for western churches). -j Display Julian days (days one-based, numbered from January 1). -m month Display the specified month. -o Display date of orthodox easter (Greek and Russian Orthodox Churches). -p Print the country codes and switching days from Julian to Gregorian Calendar as they are assumed by ncal. The country code as deter- mined from the local environment is marked with an asterisk. -s country_code Assume the switch from Julian to Gregorian Calendar at the date associated with the country_code. If not specified, ncal tries to guess the switch date from the local environment or falls back to September 2, 1752. This was when Great Britain and her colonies switched to the Gregorian Calendar. -w Print the number of the week below each week column. -y Display a calendar for the specified year. A single parameter specifies the year (1 - 9999) to be displayed; note the year must be fully specified: ``cal 89'' will not display a calen- dar for 1989. Two parameters denote the month and year; the month is either a number between 1 and 12, or a full or abbreviated name as specified by the current locale. Month and year default to those of the current system clock and time zone (so ``cal -m 8'' will display a calendar for the month of August in the current year). A year starts on Jan 1. SEE ALSO
calendar(3), strftime(3) HISTORY
A cal command appeared in Version 5 AT&T UNIX. The ncal command appeared in FreeBSD 2.2.6. AUTHORS
The ncal command and manual were written by Wolfgang Helbig <helbig@FreeBSD.org>. BUGS
The assignment of Julian--Gregorian switching dates to country codes is historically naive for many countries. BSD
November 23, 2004 BSD
All times are GMT -4. The time now is 02:04 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy