cal(1) General Commands Manual cal(1)Name
cal - print calendar
Syntax
cal [month] year
Description
The command prints a calendar for the specified year. If a month is also specified, a calendar just for that month is printed. The year
can be between 1 and 9999. The month is a number between 1 and 12. The following example produces a calendar for October 1988.
cal 10 1988
Restrictions
The year is always considered to start in January.
cal(1)
Check Out this Related Man Page
cal(1) General Commands Manual cal(1)NAME
cal - Displays a calendar
SYNOPSIS
cal [month [year]]
STANDARDS
Interfaces documented on this reference page conform to industry standards as follows:
cal: XCU5.0
Refer to the standards(5) reference page for more information about industry standards and associated tags.
OPTIONS
None
OPERANDS
Names the month for which you want the calendar. It can be a number between 1 and 12 for January through December, respectively. If month
is not specified, cal displays a calendar for the entire year, unless year is also omitted. Names the year for which you want the calen-
dar. Because cal can display a calendar for any year from 1 to 9999, enter the full year rather than just the last two digits. If year is
not specified, cal uses the current year.
If no operands are specified, cal displays a calendar for the current month.
DESCRIPTION
The cal command writes to standard output a Gregorian calendar for the specified year or month.
For historical reasons, the cal command's Gregorian calendar is discontinuous. The display for September 1752 (cal 9 1752) jumps from
Wednesday the 2nd to Thursday the 14th.
The cal command checks the LC_TIME environment variable and uses the correct headers for the current locale. If LC_TIME is not set, cal
checks the value of LANG. If neither variable is set, you receive English headers.
EXIT STATUS
The following exit values are returned: Successful completion. An error occurred.
EXAMPLES
To display a calendar for February 1990, enter: cal 2 1990 To display a calendar for the year 84 A.D., enter: cal 84 To display a calendar
for the current month, enter: cal
ENVIRONMENT VARIABLES
The following environment variables affect the execution of *cmd*: Provides a default value for the internationalization variables that are
unset or null. If LANG is unset or null, the corresponding value from the default locale is used. If any of the internationalization vari-
ables contain an invalid setting, the utility behaves as if none of the variables had been defined. If set to a non-empty string value,
overrides the values of all the other internationalization variables. Determines the locale for the interpretation of sequences of bytes
of text data as characters (for example, single-byte as opposed to multibyte characters in arguments). Determines the locale for the for-
mat and contents of diagnostic messages written to standard error. Determines the format and contents of the calendar. Determines the
location of message catalogues for the processing of LC_MESSAGES. Determines the time zone used to calculate the value of the current
month.
SEE ALSO
Commands: date(1)
Files: locale(4)
Standards: standards(5)
Command and Shell User's Guide
cal(1)
Hi
I try to configure snedmail as smtp for my solaris box. if the useres are local there's no problem everything's working fine, but is it outside, sendmail says it could find the host. why?! all other tools find diffrent host?
Could anyone tell me how I set up an easy mx ? So I test it with... (29 Replies)
Hi,
I am looking for a C library feature, to which I can say execute a function every 10 seconds.
for Eg
#include <timer_lib.h>
fun1(){
printf("I am still cool ");
}
int main(){
run(10,&fun1); // Should register & execute the function fun1 every 10 seconds
return 0x0;
}... (24 Replies)
My system does not have wget, curl and lynx. The chances are low that the SA would install them for me. Do I have any other way out? I need to invoke a few URL calls from my SHELL script.
Thought of using a PERL script or writing a simple Java client, but that adds in more dependencies.
Any... (37 Replies)
I have created a script file named 'start-jboss'
-------------------------------------------------
#!/bin/sh
# For starting Jboss
JAVA_HOME=/home/argole/jdk/jdk1.6.0_10
export JAVA_HOME
cd /home/argole/server/jboss-4.2.0.GA/bin
echo "Starting JBOSS server"
nohup ./run.sh -c... (25 Replies)
Hey everyone,
I'm completely stumped on this. An AIX machine I'm working on is attempting to send email, but the SMTP connection is failing. I have no idea what this code does or if it should even work. If someone could give me a hand, or a suggestion on what else to use, I would appreciate... (54 Replies)
1. The problem statement, all variables and given/known data:
Find the first letter in alphabet from the input:
Accept the input of a series of upper case alphabetic letters one at a time. The input ends with a 0. Find and display the first letter in alphabetic order. For example, input... (27 Replies)
nawk -F, 'NR==FNR{file=FILENAME;a++;next} a{if(FILENAME~file)next;b++;}
END{ for(i in a){if(a && !b){print "NEW: "i}} for(i in b){if(b)print i"\t\t"b}}' OFS=, 123.csv *.csv
I need to include 123.csv into the equation for the total output currently it compares whatever is on 123.csv against... (27 Replies)
Just my second week working on awk I need a hint for the following tasks.
I want to limit my logfile from the very outset to 200 lines. All I do until now is
head -c 10K >> /home/uplog.txt | awk 'END{print NR " swap " NF$5; exit}' /home/uplog.txt;
After being read it shall print the very... (27 Replies)
Please note, this information was copied from vbseo.com, now showing a database error. This is posted for reference since vbSEO seems to be going out of business:
If you ever need to uninstall vBSEO , you can use the following instructions. Make sure you carefully follow each step.
Login... (37 Replies)
Following one line of awk code removes first 3 characters from each line but when I run the same code on another linux platform it doesn't work and only prints blank lines for each record. Can anyone please explain why this doesn't work? (31 Replies)
Hi Folks -
I'm looking for the best way to to increment fiscal weeks - allow me to explain.
At my one client, 10/01/17 was the beginning if year fiscal year 2018.
Each week, I need to manage a unique set of variable that are updated in my application - they are called substitution variables.... (31 Replies)
Hi folks,
I have a script where i am trying to calc the difference between two epoch dates and then have a condition based on the resultant value.
When I run the script it keeps complaining;
expr: syntax error
./testdiff.sh: line 11: syntax error in conditional expression
./testdiff.sh:... (25 Replies)
Where do you go to participate in technical discussions besides UNIX.COM and why?
Personally, I do not really participate in other forums and discussion boards, but I do ask questions from time to time on Stack sites. The problem I have with Stack is that my questions are never answered on any... (30 Replies)