What are -A and -B options?

086

The -A and -B options in the cal command are used to display additional months relative to the specified month.

Options:

  • -A n: Displays n months after the specified month.
  • -B n: Displays n months before the specified month.

Example:

  1. To show the current month and the next two months:

    cal -A 2
  2. To show the current month and the previous month:

    cal -B 1
  3. To show a specific month (e.g., April 2026) and the next three months:

    cal 4 2026 -A 3

These options help you view a range of months easily. If you have more questions, feel free to ask!

0 Comments

no data
Be the first to share your comment!