cal is a command line application which displays an ASCII calendar along with the current date.

learn more… | top users | synonyms

2
votes
1answer
28 views

calendar to check the date and then search 3 months back and add up the days of those months?

I want to use the cal comand or the date comand to displace the current day then I want it to displace 3 months before the current date then add up all the days in those 3 months up to the current ...
1
vote
1answer
48 views

How to emphasize holidays by color in `cal` command

I want to emphasize holidays by color in cal or similar command. I'm using OS X and Ubuntu 14, is there easy way to enable the function?
1
vote
3answers
330 views

bash script that reads user input and uses “cal” command to validate dates

I want to write a script that reads my input (for example if my script is called "check", then I would type "check 9 4 1993" and that input would go through the cal command and will check through the ...
0
votes
1answer
56 views

how to write this if command?

my script name is 1. when i type in "1 2012 12 12". it shows current date calendar and when i enter a invaild date like "1 2323232" cal gives me a error so how could i put that in if loop that if it ...
2
votes
1answer
81 views

Highlight today in Mac's cal

Every Mac comes with cal which shows a simple calendar of current month. Output is something like this: February 2014 Su Mo Tu We Th Fr Sa 1 2 3 4 5 6 7 8 9 10 11 12 13 ...
1
vote
1answer
106 views

Julian calendar for a UK locale in ncal

On my machine, ncal identifies my country code as GB, and use that to find the date for the shift to the gregorian calendar, and I think cal uses the same date by default: cal: $ cal 09 1752 ...
1
vote
1answer
377 views

How to make FreeBSD variant of cal start weeks on mondays?

Can week start day be changed in cal output? Is it hardcoded? Notice: not the ncal.
2
votes
1answer
166 views

Cal no space delimiter

I am an OpenBSD user and I am writing an awk script which automatically generates TeX course calendars for all courses that I teach. To obtain actual calendar out of the system I use Unix cal command. ...
10
votes
2answers
6k views

Is `cal` broken? What happened in September 1752?

If you look at the output of cal 9 1752 you will see this strange output: September 1752 S M Tu W Th F S 1 2 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 The following story ...
1
vote
3answers
1k views

Highlight the current date in cal

I would like to highlight today's date in the output of the cal command. What is the best way? This is what I have so far: cal -m | grep -C6 --color "$(date +%e)" but it doesn't work for all cases ...