Cal (command)

Last updated
cal
Developer(s) Charles Dye
Initial releaseNovember 3, 1971;52 years ago (1971-11-03)
Written inPlan 9: C
FreeDOS: x86 assembly language
Operating system Unix, Unix-like, Plan 9, Inferno, MSX-DOS, FreeDOS
Platform Cross-platform
Type Command
License util-linux: BSD-4-Clause
FreeDOS: Freeware / Source-available software
Plan 9: MIT License

cal is a command-line utility on a number of computer operating systems including Unix, Plan 9, Inferno and Unix-like operating systems such as Linux that prints an ASCII calendar of the given month or year. If the user does not specify any command-line options, cal will print a calendar of the current month. The command is a standard program on Unix and specified in the Single UNIX Specification.

Contents

Implementations

The cal command was present in 1st Edition Unix. A cal command is also part of ASCII's MSX-DOS2 Tools for MSX-DOS version 2. [1] It is also available for FreeDOS. This implementation only supports the Gregorian calendar (New Style) and may be distributed freely, with or without source. The FreeDOS version was developed by Charles Dye. [2]

Examples

$ cal     February 2024                    Su Mo Tu We Th Fr Sa              1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
$ cal-3(showstheprevious,currentandnextmonth)     June 2022             July 2022            August 2022       Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa            1  2  3  4                  1  2      1  2  3  4  5  6   5  6  7  8  9 10 11   3  4  5  6  7  8  9   7  8  9 10 11 12 13  12 13 14 15 16 17 18  10 11 12 13 14 15 16  14 15 16 17 18 19 20  19 20 21 22 23 24 25  17 18 19 20 21 22 23  21 22 23 24 25 26 27  26 27 28 29 30        24 25 26 27 28 29 30  28 29 30 31
$ cal2023                            2023      January               February               March          Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa   1  2  3  4  5  6  7            1  2  3  4            1  2  3  4   8  9 10 11 12 13 14   5  6  7  8  9 10 11   5  6  7  8  9 10 11  15 16 17 18 19 20 21  12 13 14 15 16 17 18  12 13 14 15 16 17 18  22 23 24 25 26 27 28  19 20 21 22 23 24 25  19 20 21 22 23 24 25  29 30 31              26 27 28              26 27 28 29 30 31            April                  May                   June          Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa                     1      1  2  3  4  5  6               1  2  3   2  3  4  5  6  7  8   7  8  9 10 11 12 13   4  5  6  7  8  9 10   9 10 11 12 13 14 15  14 15 16 17 18 19 20  11 12 13 14 15 16 17  16 17 18 19 20 21 22  21 22 23 24 25 26 27  18 19 20 21 22 23 24  23 24 25 26 27 28 29  28 29 30 31           25 26 27 28 29 30     30                                                                        July                 August              September        Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa                     1         1  2  3  4  5                  1  2   2  3  4  5  6  7  8   6  7  8  9 10 11 12   3  4  5  6  7  8  9   9 10 11 12 13 14 15  13 14 15 16 17 18 19  10 11 12 13 14 15 16  16 17 18 19 20 21 22  20 21 22 23 24 25 26  17 18 19 20 21 22 23  23 24 25 26 27 28 29  27 28 29 30 31        24 25 26 27 28 29 30  30 31                                                                   October               November              December        Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa   1  2  3  4  5  6  7            1  2  3  4                  1  2   8  9 10 11 12 13 14   5  6  7  8  9 10 11   3  4  5  6  7  8  9  15 16 17 18 19 20 21  12 13 14 15 16 17 18  10 11 12 13 14 15 16  22 23 24 25 26 27 28  19 20 21 22 23 24 25  17 18 19 20 21 22 23  29 30 31              26 27 28 29 30        24 25 26 27 28 29 30                                              31
$ cal62023      June 2023        Su Mo Tu We Th Fr Sa               1  2  3   4  5  6  7  8  9 10  11 12 13 14 15 16 17  18 19 20 21 22 23 24  25 26 27 28 29 30

Quirks (1752)

$ cal91752  September 1752 S  M Tu  W Th  F  S       1  2 14 15 1617 18 19 20 21 22 2324 25 26 27 28 29 30

The Gregorian calendar reform was adopted by the Kingdom of Great Britain, including its possessions in North America (later to become eastern USA and Canada), in September 1752. As a result, the September 1752 cal shows the adjusted days missing. This month was the official (British) adoption of the Gregorian calendar from the previously used Julian calendar. This has been documented in the man pages for Sun Solaris as follows. "An unusual calendar is printed for September 1752. That is the month when 11 days were skipped to make up for lack of leap year adjustments." [3] The Plan 9 from Bell Labs manual states: "Try cal sep 1752." Date of adoption of the reform differs widely between countries so, for some users, this feature may be a bug. Special handling of 1752 is known to have appeared as early as the first edition of the Unix Programmer's Manual in 1971. [4]

See also

Related Research Articles

<span class="mw-page-title-main">Bash (Unix shell)</span> GNU replacement for the Bourne shell

Bash is a Unix shell and command language written by Brian Fox for the GNU Project as a free software replacement for the Bourne shell. The shell's name is an acronym for Bourne-Again SHell, a pun on the name of the Bourne shell that it replaces and the notion of being "born again". First released in 1989, it has been used as the default login shell for most Linux distributions and it was one of the first programs Linus Torvalds ported to Linux, alongside GCC. It is available on nearly all modern operating systems.

The Single UNIX Specification (SUS) is a standard for computer operating systems, compliance with which is required to qualify for using the "UNIX" trademark. The standard specifies programming interfaces for the C language, a command-line shell, and user commands. The core specifications of the SUS known as Base Specifications are developed and maintained by the Austin Group, which is a joint working group of IEEE, ISO/IEC JTC 1/SC 22/WG 15 and The Open Group. If an operating system is submitted to The Open Group for certification, and passes conformance tests, then it is deemed to be compliant with a UNIX standard such as UNIX 98 or UNIX 03.

<span class="mw-page-title-main">Vim (text editor)</span> Improved version of the Vi keyboard-oriented text editor

Vim is a free and open-source, screen-based text editor program. It is an improved clone of Bill Joy's vi. Vim's author, Bram Moolenaar, derived Vim from a port of the Stevie editor for Amiga and released a version to the public in 1991. Vim is designed for use both from a command-line interface and as a standalone application in a graphical user interface. Since its release for the Amiga, cross-platform development has made it available on many other systems. In 2018, it was voted the most popular editor amongst Linux Journal readers; in 2015 the Stack Overflow developer survey found it to be the third most popular text editor, and in 2019 the fifth most popular development environment.

grep is a command-line utility for searching plain-text data sets for lines that match a regular expression. Its name comes from the ed command g/re/p, which has the same effect. grep was originally developed for the Unix operating system, but later available for all Unix-like systems and some others such as OS-9.

man page Unix software documentation

A man page is a form of software documentation usually found on a Unix or Unix-like operating system. Topics covered include computer programs, formal standards and conventions, and even abstract concepts. A user may invoke a man page by issuing the man command.

ls Command to list files and directories in Unix and Unix-like operating systems

In computing, ls is a command to list computer files and directories in Unix and Unix-like operating systems. It is specified by POSIX and the Single UNIX Specification.

The Unix command su, which stands for 'substitute user', is used by a computer user to execute commands with the privileges of another user account. When executed it invokes a shell without changing the current working directory or the user environment.

sudo Command on Unix systems to temporarily assume root privileges

sudo is a program for Unix-like computer operating systems that enables users to run programs with the security privileges of another user, by default the superuser. It originally stood for "superuser do", as that was all it did, and it is its most common usage; however, the official Sudo project page lists it as "su 'do'". The current Linux manual pages for su define it as "substitute user", making the correct meaning of sudo "substitute user, do", because sudo can run a command as other users as well.

The Gryazev-Shipunov GSh-23 is a twin-barreled 23 mm autocannon developed in the Soviet Union, primarily for military aircraft use. It entered service in 1965, replacing the earlier Nudelman-Rikhter NR-23 and Rikhter R-23.

<span class="mw-page-title-main">Ukrainian Air Force</span> Aerial warfare branch of Ukraines armed forces

The Ukrainian Air Force is the air force of Ukraine and one of the seven branches of the Armed Forces of Ukraine. Its current form was created in 2004 by merging the Ukrainian Air Defence Forces into the Air Force.

This is an almanac-like listing of major Jewish holidays from 2000 to 2050. All Jewish holidays begin at sunset on the evening before the date shown. On holidays marked "*", Jews are not permitted to work. Because the Hebrew calendar no longer relies on observation but is now governed by precise mathematical rules, it is possible to provide, for the future, the Gregorian calendar date on which a holiday will fall.

<span class="mw-page-title-main">Russian Air Force</span> Branch of the Russian Aerospace Forces

The Russian Air Force is a branch of the Russian Aerospace Forces, the latter being formed on 1 August 2015 with the merging of the Russian Air Force and the Russian Aerospace Defence Forces. The modern VVS was originally established on 7 May 1992 following Boris Yeltsin's creation of the Ministry of Defence. However, the Russian Federation's air force can trace its lineage and traditions back to the Imperial Russian Air Service (1912–1917) and the Soviet Air Forces (1918–1991).

The Lutheran Church has, from the time of the Reformation, continued the remembrance of saints. The theological basis for this remembrance may be best illustrated in the words of the Epistle to the Hebrews: "Seeing we also are compassed about with so great a cloud of witnesses, let us lay aside every weight, and the sin which doth so easily beset us, and let us run with patience the race that is set before us." The Apology of the Augsburg Confession states that the remembrance of the saints has three parts: "The first is thanksgiving. For we ought to give thanks to God because He has shown examples of mercy; because He has shown that He wishes to save men; because He has given teachers or other gifts to the Church. And these gifts, as they are the greatest, should be amplified, and the saints themselves should be praised, who have faithfully used these gifts, just as Christ praises faithful business-men. The second service is the strengthening of our faith; when we see the denial forgiven Peter, we also are encouraged to believe the more that grace truly superabounds over sin. The third honor is the imitation, first, of faith, then of the other virtues, which every one should imitate according to his calling."

sar (Unix) Unix command to collect, report or save system activity information

System Activity Report (sar) is a Unix System V-derived system monitor command used to report on various system loads, including CPU activity, memory/paging, interrupts, device load, network and swap space utilization. Sar uses /proc filesystem for gathering information.

<span class="mw-page-title-main">Ken Thompson</span> American computer scientist, co-creator of the Unix operating system

Kenneth Lane Thompson is an American pioneer of computer science & Computer Chess Development. Thompson worked at Bell Labs for most of his career where he designed and implemented the original Unix operating system. He also invented the B programming language, the direct predecessor to the C programming language, and was one of the creators and early developers of the Plan 9 operating system. Since 2006, Thompson has worked at Google, where he co-developed the Go programming language.

<span class="mw-page-title-main">Radio Clásica</span> Spanish national classical music radio station

Radio Clásica is a Spanish free-to-air radio station owned and operated by Radio Nacional de España (RNE), the radio division of state-owned public broadcaster Radiotelevisión Española (RTVE). It is the corporation's second radio station, and is known for broadcasting classical music.

<span class="mw-page-title-main">Amarna letter EA 365</span>

Amarna letter EA 365, titled Furnishing Corvée Workers, is a squarish, mostly flat clay tablet, but thick enough (pillow-shaped), to contain text that continues toward the right margin, the right side of the obverse side, and also to the right side of the reverse side of the tablet.

<span class="mw-page-title-main">Amarna letter EA 271</span>

Amarna letter EA 271, titled: "The Power of the 'Apiru," is a moderately short, tallish, rectangular clay tablet letter, approximately 3 in wide x 4 in tall, from Milkilu the mayor/ruler of Gazru (Gezer), of the mid 14th century BC Amarna letters.

The following is a list of events affecting Philippine television in 2017. Events listed include television show debuts, finales, cancellations, and channel launches, closures and rebrandings, as well as information about controversies and carriage disputes.

References

  1. "MSX-DOS2 Tools User's Manual - MSX-DOS2 TOOLS ユーザーズマニュアル". April 1, 1993 via Internet Archive.
  2. "ibiblio.org FreeDOS Package -- cal (Unix-like)". www.ibiblio.org.
  3. "Synopsis - man pages section 1: User Commands". docs.oracle.com.
  4. Thompson, K.; Ritchie, D. M. (1971). Unix Programmer's Manual (First ed.). Bell Telephone Laboratories. pp. cal (VI).

Sources