cal, ncal in Mac OS X

By: Strauss K Emailed: 1769 times Printed: 2516 times    

Latest comments
By: rohit kumar - how this program is work
By: Kirti - Hi..thx for the hadoop in
By: Spijker - I have altered the code a
By: ali mohammed - why we use the java in ne
By: ali mohammed - why we use the java in ne
By: mizhelle - when I exported the data
By: raul - no output as well, i'm ge
By: Rajesh - thanx very much...
By: Suindu De - Suppose we are executing

Display a calendar.

Syntax
     cal [-jy] [[month] year]

     cal [-j] -m month [year]

     ncal [-jJpwy] [-s country_code] [[month] year]

     ncal [-Jeo] [year]

Options:
 
   -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 Grego-
            rian Calendar as they are assumed by ncal.  The country code as
            determined 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.

The year must be specified with 4 digits.

ncal offers an alternative layout, more options and displays the date of easter. The ncal format is a little cramped but it makes a year fit on a 25x80 terminal. By default ncal is not installed, it can be enabled by creating a link as follows:

$ mkdir -p $HOME/bin
$ ln `which cal` $HOME/bin/ncal
$ $HOME/bin/ncal -w

If no parameters are specified, the current month's calendar is displayed.

Example:

$ cal 2012 


macos Home | All macos Tutorials | Latest macos Tutorials

Sponsored Links

If this tutorial doesn't answer your question, or you have a specific question, just ask an expert here. Post your question to get a direct answer.



Bookmark and Share

Comments(0)


Be the first one to add a comment

Your name (required):


Your email(required, will not be shown to the public):


Your sites URL (optional):


Your comments:



More Tutorials by Strauss K
cut in Mac OS X
curl in Mac OS X
crontab in Mac OS X
cron in Mac OS X
cp in Mac OS X
continue in Mac OS X
complete in Mac OS X
command in Mac OS X
comm in Mac OS X
cmp in Mac OS X
cksum in Mac OS X
chroot in Mac OS X
chown in Mac OS X
chmod in Mac OS X
chgrp in Mac OS X

More Tutorials in macos
Getting PHP running on Mac OS 10.1
Installing gedit for python programming in Mac OS X
What is Mac OS X?
History of Mac OS X
Major features of Mac OS X
Different Versions of Mac OS X
What is new in Mac OS X Snow Leopard
alias, unalias in Mac OS X
apropos in Mac OS X
awk in Mac OS X
basename in Mac OS X
bash in Mac OS X
bg in Mac OS X
bless in Mac OS X
break in Mac OS X

More Latest News
Most Viewed Articles (in macos )
History of Mac OS X
Different Versions of Mac OS X
awk in Mac OS X
break in Mac OS X
cal, ncal in Mac OS X
What is Mac OS X?
Major features of Mac OS X
What is new in Mac OS X Snow Leopard
alias, unalias in Mac OS X
apropos in Mac OS X
cd in Mac OS X
cksum in Mac OS X
crontab in Mac OS X
curl in Mac OS X
cut in Mac OS X
Most Emailed Articles (in macos)
Installing gedit for python programming in Mac OS X
What is Mac OS X?
apropos in Mac OS X
cal, ncal in Mac OS X
cmp in Mac OS X
crontab in Mac OS X
History of Mac OS X
Major features of Mac OS X
Different Versions of Mac OS X
What is new in Mac OS X Snow Leopard
alias, unalias in Mac OS X
awk in Mac OS X
basename in Mac OS X
bash in Mac OS X
bg in Mac OS X