02-11-2004
Use a case statement to convert month to numeric form.
9 More Discussions You Might Find Interesting
1. IP Networking
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
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
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
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
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
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
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
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
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 -- displays a calendar
SYNOPSIS
cal [-smjy13] [[month] year]
DESCRIPTION
Cal displays a simple calendar. If arguments are not specified, the current month is displayed. The options are as follows:
-1 Display single month output. (This is the default.)
-3 Display prev/current/next month output.
-s Display Sunday as the first day of the week. (This is the default.)
-m Display Monday as the first day of the week.
-j Display Julian dates (days one-based, numbered from January 1).
-y Display a calendar for the current 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 (1 - 12) and year. If no parameters are specified, the current month's calendar is displayed.
A year starts on Jan 1.
The Gregorian Reformation is assumed to have occurred in 1752 on the 3rd of September. By this time, most countries had recognized the ref-
ormation (although a few did not recognize it until the early 1900's.) Ten days following that date were eliminated by the reformation, so
the calendar for that month is a bit unusual.
HISTORY
A cal command appeared in Version 6 AT&T UNIX.
OTHER VERSIONS
Several much more elaborate versions of this program exist, with support for colors, holidays, birthdays, reminders and appointments, etc.
For example, try the cal from http://home.sprynet.com/~cbagwell/projects.html or GNU gcal.
BSD
June 6, 1993 BSD