Raspberry Pi_Kor_10.10.2 “cal” 명령과 “ncal” 명령


Published Book on Amazon


All of IOT

Starting with the Latest Raspberry Pi from Beginner to Advanced – Volume 1

All of IOT

Starting with the Latest Raspberry Pi from Beginner to Advanced – Volume 2


출판된 한글판 도서


최신 라즈베리파이(Raspberry Pi)로 시작하는 사

물인터넷(IOT)의 모든 것 – 초보에서 고급까지 (상)

최신 라즈베리파이(Raspberry Pi)로 시작하는 사

물인터넷(IOT)의 모든 것 – 초보에서 고급까지 (하)


Original Book Contents


10.10.2               "cal" 명령과 "ncal" 명령

 

이 명령은 달력을 출력해주는 기능을 수행한다. "cal" 명령은 보다 단순한 형태로 전통적인 달력 형식으로 보여주는데 반하여, "ncal" 명령은 다양한 형식으로 보여줄 수도 있고, 다양한 option을 활용할 수도 있다.

 

다음은 "cal" 명령에 대한 사용 형식을 설명하고 있다.

 

[명령 형식]

cal [-3hjy] [-A number] [-B number] [[month] year]

cal [-3hj] [-A number] [-B number] -m month [year]

 

다음은 "ncal" 명령에 대한 사용 형식을 설명하고 있다.

 

[명령 형식]

ncal [-3bhjJpwySM] [-A number] [-B number] [-s country_code] [[month] year]

ncal [-3bhJeoSM] [-A number] [-B number] [year]

ncal [-CN] [-H yyyy-mm-dd] [-d yyyy-mm]

 

[명령 개요]

    지정된 일자의 달력을 출력해 준다.

    user 권한    -- 일반 user.

 

[상세 설명]

    None

 

[주요 Option]

-J

Display Julian Calendar, if combined with the -o option, display date of  Orthodox Easter according to the Julian Calendar.

-e

Display date of Easter (for western churches).

-m month

 

Display the specified month.  If month is specified as a decimal number, appending f or p displays the same month of the following or previous year respectively.

-w

Print the number of the week below each week column.

-y

Display a calendar for the specified year. This option is implied when a year but no month are specified on the command line.

-3

Display the previous, current and next month surrounding today.

-1

Display only the current month. This is the default.  Manual page cal(1) line 19 (press h for help or q to quit)

-d yyyy-mm

Use yyyy-mm as the current date (for debugging of date selection).

-H yyyy-mm-dd

Use yyyy-mm-dd as the current date (for debugging of highlighting).

 

[사용 Example]

다음은 현재 월의 달력을 출력한다. . 

 

pi@raspberrypi ~ $ cal

June 2016

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

 

다음 사례는 2015 08월의 달력을 인쇄한다.

 

pi@raspberrypi ~ $ cal -d 2015-08

August 2015

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 31

 

 

 

Leave a Reply