calendar: how to manage multiple calendar files?

Bug #1697448 reported by G.M.
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bsdmainutils (Ubuntu)
New
Undecided
Unassigned

Bug Description

Hi,

I'm using BSD's "calendar" to print dates of interest at each opening of a terminal (in fact, of a shell...).

As you can guess, I need the number of entries to be as low as possible in order not to pollute my screen.

For the moment, I use "calendar.french", but there are too many entries there. I'd like to use only the files "/usr/share/calendar/fr_FR/calendar.fetes and "/usr/share/calendar/fr_FR/calendar.jferies".

I've tried with multiple "-f" options, but then "calendar" defaults to its basic behaviour: using "calendar.all".

My first remark is the following: I think there's a bug here since it does not warn the user that there is an error in parsing the command line.

My second remark is : does anyone knows an option/trick I could use to open multiple calendar files? I've tried the following, but it does not work:
calendar -A 3 -B 3 <(cat /usr/share/calendar/fr_FR/calendar.{fetes,jferies})

Thanks

Revision history for this message
G.M. (sexxxenator) wrote :

By the way, I don't know why, but now I have an additional line break after each printed entry. How can I remove that ?

Revision history for this message
G.M. (sexxxenator) wrote :

In reply to my own question, I've found the following dirty hack:

 ( calendar -A 3 -B 1 -f ~/.myclendar ; \
      calendar -A 1 -B 1 -f /usr/share/calendar/xx_xx/calendar.yyy ; \
      calendar -A 7 -B 0 -f /usr/share/calendar/xx_xx/calendar.zzz) | sed '/^$/d' | sort -k1,1 -k2,2

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.