04-25-2014
Yes.
With nawk it is working fine. Thanks again.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Friends,
I'm doing on script which finds all the files with time stamp and makes them tar and zip, based on their respective month&year. for instance "mar-2004.tar.zip" will contain all the files which was created/accessed/modified on mar-2004. like this the entire filesystem should be taken... (1 Reply)
Discussion started by: tuxfello
1 Replies
2. Shell Programming and Scripting
Dear All,
Actually, i'm doing some reporting job and i need to pass yesterday's date in Year-Month-Day format(e.g. 2009-06-10) to another program for generating 2009-06-10 report.
to get today's date, it's easy to just date '+%Y%m%d' , but no idea how can i get this kind of format for... (2 Replies)
Discussion started by: tiger2000
2 Replies
3. Shell Programming and Scripting
Hiii i have a file with data as shown below:
a.dat:
RAO 1900 2 7 0 0 0.00 10.8000 76.8000 10.0 0 0.00 0 6.00 0.00 0.00 0 0.00 6.00 0 NULL
LEE 1901 2 15 0 0 0.00 26.0000 100.0000 0.0 0 0.00 0 0.00 0.00 0.00 0 6.00 6.00 0 NULL
RAO 1901 4... (3 Replies)
Discussion started by: reva
3 Replies
4. UNIX for Dummies Questions & Answers
how can i display month of the year i was born with using man command?
thanks (2 Replies)
Discussion started by: janetroop95
2 Replies
5. Shell Programming and Scripting
hello,
I have many files called day001, day002, day003 and I want to rename them by day20070101, day20070102, etc.
I need to do it for several years and leap years as well.
What is the best way to do it ?
Thank you. (1 Reply)
Discussion started by: Ggg
1 Replies
6. Shell Programming and Scripting
Hi All,
I need to find all files other than first two files dates & last file date for month and month/year wise list.
lets say there are following files in directory
Mar 19 2012 c.txt
Mar 19 2012 cc.txt
Mar 21 2012 d.txt
Mar 22 2012 f.txt
Mar 24 2012 h.txt
Mar 25 2012 w.txt
Feb 12... (2 Replies)
Discussion started by: Makarand Dodmis
2 Replies
7. UNIX for Advanced & Expert Users
Hi All,
I need to find all files other than first two files dates & last file date for month and month/year wise list.
lets say there are following files in directory
Mar 19 2012 c.txt
Mar 19 2012 cc.txt
Mar 21 2012 d.txt
Mar 22 2012 f.txt
Mar 24 2012 h.txt
Mar 25 2012 w.txt
Feb 12... (16 Replies)
Discussion started by: Makarand Dodmis
16 Replies
8. Shell Programming and Scripting
Hi All,
I find all files for same month and year
lets say there are following files in directory
-rwxr-xr-x 1 user userg 1596 Mar 19 2012 c.txt
-rwxr-xr-x 1 user userg 1596 Mar 21 2012 d.txt
-rwxr-xr-x 1 user userg 1596 Mar 22 2012 f.txt
-rwxr-xr-x 1... (8 Replies)
Discussion started by: Makarand Dodmis
8 Replies
9. Shell Programming and Scripting
Hi All,
lets say there are following files in directory
-rwxr-xr-x 1 user userg 1596 Mar 19 2012 a.txt
-rwxr-xr-x 1 user userg 1596 Mar 19 2012 b.txt
-rwxr-xr-x 1 user userg 1596 Mar 22 2012 c.txt
-rwxr-xr-x 1 user userg 1596 Mar 24 2012 d.txt... (16 Replies)
Discussion started by: Makarand Dodmis
16 Replies
10. UNIX for Beginners Questions & Answers
Hi,
I am trying to add few (say 3 days) to sysdate using -
date -d '+ 3 days' +%y%m%d
and it works as expected.
But how to add few (say 3 days) to a literal date value and how bash treats a literal value as a date. Can we say just like in ORACLE TO_DATE that my given literal date value... (2 Replies)
Discussion started by: pointers1234
2 Replies
CAL(1) BSD General Commands Manual CAL(1)
NAME
cal, ncal -- displays a calendar and the date of Easter
SYNOPSIS
cal [-3hjy] [-A number] [-B number] [[month] year]
cal [-3hj] [-A number] [-B number] -m month [year]
ncal [-3hjJpwy] [-A number] [-B number] [-s country_code] [[month] year]
ncal [-3hJeo] [-A number] [-B number] [year]
ncal [-CN] [-H yyyy-mm-dd] [-d yyyy-mm]
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:
-h Turns off highlighting of today.
-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. If month is specified as a decimal number, it may be followed by the letter 'f' or 'p' to indicate the
following or preceding month of that number, respectively.
-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.
-3 Display the previous, current and next month surrounding today.
-A number
Display the number of months after the current month.
-B number
Display the number of months before the current month.
-C Switch to cal mode.
-N Switch to ncal mode.
-d yyyy-mm
Use yyyy-mm as the current date (for debugging of date selection).
-H yyyy-mm-dd
Use yyyy-mm-dd as the current date (for debugging of highlighting).
A single parameter specifies the year (1-9999) to be displayed; note the year must be fully specified: ``cal 89'' will not display a calendar
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 speci-
fied 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 calen-
dar for the month of August in the current year).
Not all options can be used together. For example ``-3 -A 2 -B 3 -y -m 7'' would mean: show me the three months around the seventh month,
three before that, two after that and the whole year. ncal will warn about these combinations.
A year starts on January 1.
Highlighting of dates is disabled if stdout is not a tty.
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.
Not all options are compatible and using them in different orders will give varying results.
BSD
March 14, 2009 BSD