0

When I want to see a calendar on Ubuntu, I just command like this:

$ cal -3

Then, it displays prev/current/next month output.

But, the cal command of OSX is a bit different from Ubuntu's, and there's no -3 option.

If I see the history section of man page, OSX's looks like this

A cal command appeared in Version 5 AT&T UNIX. The ncal command appeared in FreeBSD 2.2.6.

And, the history section of Ubuntu's man page says

A cal command appeared in Version 6 AT&T UNIX. 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.

Can I use Ubuntu's cal command on OSX?

2

I've been searching for cal -3 functionality on Mac as well.

From your quote, there's an alternative, GNU gcal, which is radically different from cal command. There's a tutorial that's easy to follow as well.

So I settled with it. You can type gcal . for cal -3 equivalent.

  • Do you know why it shows calendar in a vertical format on some machine? – Sanghyun Lee Jul 27 '14 at 11:28
  • I believe it's the locale stuff. LC_ALL=ja_JP.UTF-8 gcal gave me a vertical format. – Thai Jul 28 '14 at 12:38
  • Yes, it was locale problem. Thank you! I don't know why the gcal show a vertical format in Korean locale. We don't use the vertical format. :( – Sanghyun Lee Jul 28 '14 at 13:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .