3947840b05
Interpretation of a chunk in cut.1 was helped by: Yoshihiko Sarumaru <mistral@imasy.or.jp>, hrs
212 lines
5.9 KiB
Groff
212 lines
5.9 KiB
Groff
.\" Copyright (c) 1993
|
||
.\" The Regents of the University of California. All rights reserved.
|
||
.\"
|
||
.\" Redistribution and use in source and binary forms, with or without
|
||
.\" modification, are permitted provided that the following conditions
|
||
.\" are met:
|
||
.\" 1. Redistributions of source code must retain the above copyright
|
||
.\" notice, this list of conditions and the following disclaimer.
|
||
.\" 2. Redistributions in binary form must reproduce the above copyright
|
||
.\" notice, this list of conditions and the following disclaimer in the
|
||
.\" documentation and/or other materials provided with the distribution.
|
||
.\" 3. All advertising materials mentioning features or use of this software
|
||
.\" must display the following acknowledgement:
|
||
.\" This product includes software developed by the University of
|
||
.\" California, Berkeley and its contributors.
|
||
.\" 4. Neither the name of the University nor the names of its contributors
|
||
.\" may be used to endorse or promote products derived from this software
|
||
.\" without specific prior written permission.
|
||
.\"
|
||
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||
.\" SUCH DAMAGE.
|
||
.\"
|
||
.\" @(#)jot.1 8.1 (Berkeley) 6/6/93
|
||
.\" %FreeBSD: src/usr.bin/jot/jot.1,v 1.15 2004/07/02 22:22:26 ru Exp %
|
||
.\"
|
||
.\" $FreeBSD$
|
||
.\"
|
||
.Dd June 6, 1993
|
||
.Dt JOT 1
|
||
.Os
|
||
.Sh ̾¾Î
|
||
.Nm jot
|
||
.Nd Ϣ³¤Ê¤¤¤·¤Ï¡¢Íð¿ô¥Ç¡¼¥¿¤ò½ÐÎϤ¹¤ë
|
||
.Sh ½ñ¼°
|
||
.Nm
|
||
.Op Fl cnr
|
||
.Op Fl b Ar word
|
||
.Op Fl w Ar word
|
||
.Op Fl s Ar string
|
||
.Op Fl p Ar precision
|
||
.Op Ar reps Op Ar begin Op Ar end Op Ar s
|
||
.Sh ²òÀâ
|
||
.Nm
|
||
¥æ¡¼¥Æ¥£¥ê¥Æ¥£¤Ï¡¢
|
||
Áý²Ã¡¦¸º¾¯¡¦¥é¥ó¥À¥à¡¦¾éĹ¥Ç¡¼¥¿¤òÄ̾ï¤Ï¿ô»ú¤Ç¡¢°ì¹ÔËè¤Ë½ÐÎϤ·¤Þ¤¹¡£
|
||
.Pp
|
||
°Ê²¼¤Î¤è¤¦¤Ê¥ª¥×¥·¥ç¥ó¤¬ÍøÍѤǤ¤Þ¤¹¡£
|
||
.Bl -tag -width indent
|
||
.It Fl r
|
||
¥Ç¥Õ¥©¥ë¥È¤ÎϢ³¤·¤¿¥Ç¡¼¥¿¤ÎÂå¤ï¤ê¤Ë¡¢Íð¿ô¤òºîÀ®¤·¤Þ¤¹¡£
|
||
.It Fl b Ar word
|
||
.Ar word
|
||
¤ò¡¢·«¤êÊÖ¤·½ÐÎϤ¹¤ë¤À¤±¤Ç¤¹¡£
|
||
.It Fl w Ar word
|
||
.Ar word
|
||
¤Î¤¢¤È¤Ë¡¢À¸À®¤µ¤ì¤¿¥Ç¡¼¥¿¤òÉÕ¤±²Ã¤¨¡¢½ÐÎϤ·¤Þ¤¹¡£
|
||
8 ¿Ê¡¦16 ¿Ê¡¦»Ø¿ô¡¦ASCII¡¦0 ¤ÇËä¤á¤¿É½¼¨¡¦±¦µÍ¤áɽ¸½¤Ê¤É¤Ï¡¢Å¬ÀÚ¤Ê
|
||
.Xr printf 3
|
||
µË¡¤ò
|
||
.Ar word
|
||
Ãæ¤Ç»ØÄꤹ¤ë¤³¤È¤Ç¡¢²Äǽ¤Ç¤¹¡£¤³¤Î¾ì¹ç¡¢¥Ç¡¼¥¿¤ÏÄɲ䵤ì¤ë¤È¤¤¤¦¤è¤ê¤â¡¢
|
||
ÁÞÆþ¤µ¤ì¤ë¤È¹Í¤¨¤Æ¤¯¤À¤µ¤¤¡£
|
||
.It Fl c
|
||
¤³¤ì¤Ï¡¢
|
||
.Fl w Ar %c
|
||
¤Î¾Êά·Á¤Ç¤¹¡£
|
||
.It Fl s Ar string
|
||
.Ar string
|
||
¤Çʬ¤±¤é¤ì¤¿¥Ç¡¼¥¿¤ò½ÐÎϤ·¤Þ¤¹¡£
|
||
ÉáÄ̤ϡ¢²þ¹Ôʸ»ú¤¬¥Ç¡¼¥¿¤òʬ³ä¤·¤Þ¤¹¡£
|
||
.It Fl n
|
||
Ä̾ïÄɲ䵤ì¤ë¡¢ºÇ¸å¤Î²þ¹Ô¤ò½ÐÎϤ·¤Þ¤»¤ó¡£
|
||
.It Fl p Ar precision
|
||
À°¿ô
|
||
.Ar precision
|
||
¤Ç»ØÄꤵ¤ì¤¿¥Ç¡¼¥¿¤Îʸ»ú¿ô¤â¤·¤¯¤Ï·å¿ô¤À¤±É½¼¨¤·¤Þ¤¹¡£
|
||
.Fl p
|
||
¤¬¤Ê¤¤¾ì¹ç¡¢ÀºÅÙÃͤÏ
|
||
.Ar begin
|
||
¤È
|
||
.Ar end
|
||
¤Î°ú¿ô¤ÎÀºÅÙ¤ÎÂ礤¤Êý¤Ç¤¹¡£
|
||
.Fl p
|
||
¥ª¥×¥·¥ç¥ó¤Ï¡¢
|
||
.Fl w
|
||
¤Ë³¤¯
|
||
.Xr printf 3
|
||
µË¡¤¬»ØÄꤵ¤ì¤Æ¤¤¤ë»þ¤Ë¤Ï¡¢¾å½ñ¤¤µ¤ì¤Þ¤¹¡£
|
||
.El
|
||
.Pp
|
||
ºÇ¸å¤Î 4 ¤Ä¤Î°ú¿ô¤Ï¤½¤ì¤¾¤ì¥Ç¡¼¥¿¿ô¡¦²¼³¦¡¦¾å³¦¤È¡¢Éý¤ÎÂ礤µ¤Þ¤¿¤Ï¡¢Íð¿ô¤Î¤¿¤á
|
||
¤Î¼ï¤Ç¤¹¡£
|
||
¾¯¤Ê¤¯¤È¤â¤É¤ì¤«°ì¤Ä¤¬»ØÄꤵ¤ì¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¤¬¡¢¤½¤Î¾¤Î 3 ¤Ä¤Ï°ú¿ô¤È¤·¤Æ \
|
||
- ¤òÍ¿¤¨¤ë¤È¡¢¾Êά¤Ç¤¤Þ¤¹¡£
|
||
¤³¤ì¤é 3 ¤Ä¤Î°ú¿ô¤ò»ØÄꤹ¤ì¤Ð¡¢4 ¤ÄÌܤ¬·è¤Þ¤ê¤Þ¤¹¡£
|
||
4 ¤Ä¤È¤â»ØÄꤵ¤ì¤Æ¡¢
|
||
.Ar reps
|
||
¤ÎÍ¿¤¨¤é¤ì¤¿Ãͤȡ¢·×»»¤µ¤ì¤¿ÃͤȤ¬ÁêÈ¿¤¹¤ë¾ì¹ç¡¢¾®¤µ¤¤Êý¤òÍѤ¤¤Þ¤¹¡£
|
||
»ØÄꤵ¤ì¤¿¿ô¤¬ 3 ¤Ä¤è¤ê¾¯¤Ê¤¤¾ì¹ç¤Ë¤Ï¡¢
|
||
.Ar s
|
||
¤ò½ü¤¤¤Æ¡¢
|
||
¥Ç¥Õ¥©¥ë¥ÈÃͤòº¸¤«¤é±¦¤Ø³ä¤êÅö¤Æ¤Þ¤¹¡£
|
||
.Ar s
|
||
¤Ï¡¢
|
||
.Ar begin
|
||
¤È
|
||
.Ar end
|
||
¤¬¶¦¤Ë»ØÄꤵ¤ì¤¿¾ì¹ç°Ê³°¡¢¥Ç¥Õ¥©¥ë¥ÈÃͤ¬ÀßÄꤵ¤ì¤Þ¤¹¡£
|
||
.Pp
|
||
4 ¤Ä¤Î°ú¿ô¤ËÂФ¹¤ë¥Ç¥Õ¥©¥ë¥È¤Ï¡¢Íð¿ô¤¬Í׵ᤵ¤ì¤¿»þ¤ò½ü¤¤¤Æ¡¢
|
||
¤½¤ì¤¾¤ì¡¢100, 1, 100, 1¤Ç¤¹¡£
|
||
Íð¿ô¤Î¼ï
|
||
.Ar s
|
||
¤Ï¥é¥ó¥À¥à¤ËÁªÂò¤µ¤ì¤Þ¤¹¡£
|
||
.Ar reps
|
||
°ú¿ô¤Ï¡¢Éä¹æ̵¤·À°¿ô¤Ç¤¢¤ë¤ÈÁÛÄꤵ¤ì¤Æ¤¤¤Þ¤¹¡£
|
||
0 ¤¬Í¿¤¨¤é¤ì¤¿¾ì¹ç¤Ï¡¢Ìµ¸Â²ó¿ô¤È¤Ê¤ê¤Þ¤¹¡£
|
||
.Ar begin
|
||
¤È
|
||
.Ar end
|
||
¤Ï¡¢¼Â¿ô¡¢¤â¤·¤¯¤Ïʸ»ú¤Î¾ì¹ç¤ÏÂбþ¤¹¤ë
|
||
.Tn ASCII
|
||
ÃͤȤ·¤Æ¤¢¤¿¤¨¤é¤ì¤Þ¤¹¡£
|
||
ºÇ¸å¤Î°ú¿ô¤Ï¡¢¼Â¿ô¤Ç¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£
|
||
.Pp
|
||
Íð¿ôÃͤϡ¢
|
||
.Xr random 3
|
||
¤ò»È¤Ã¤ÆÆÀ¤é¤ì¤Þ¤¹¡£
|
||
̾Á°
|
||
.Nm
|
||
¤Ï¡¢
|
||
APL Ãæ¤Î´Ø¿ô
|
||
.Nm iota
|
||
¤ÎÉôʬ¤«¤éÍè¤Æ¤¤¤Þ¤¹¡£
|
||
.Sh »ÈÍÑÎã
|
||
¥³¥Þ¥ó¥É
|
||
.Dl jot 21 -1 1.00
|
||
.Pp
|
||
¤Ï¡¢\-1 ¤«¤é 1 ¤ØÁý²Ã¤¹¤ëÅù´Ö³Ö¤Î¿ô»ú¤ò 21 ¸Ä½ÐÎϤ·¤Þ¤¹¡£
|
||
.Tn ASCII
|
||
ʸ»ú½¸¹ç¤Ï¡¢°Ê²¼¤Î¤è¤¦¤Ë¤·¤Þ¤¹¡£
|
||
.Dl jot -c 128 0
|
||
.Pp
|
||
xaa ¤«¤é xaz ¤Þ¤Ç¤Îʸ»úÎó¤Ï°Ê²¼¤Î¤è¤¦¤Ë¤·¤Þ¤¹¡£
|
||
.Dl jot -w xa%c 26 a
|
||
.Pp
|
||
20 ¸Ä¤Î¥é¥ó¥À¥à¤Ê 8 ʸ»ú¤Ï°Ê²¼¤Î¤è¤¦¤Ë¤·¤ÆºîÀ®¤·¤Þ¤¹¡£
|
||
.Dl "jot -r -c 160 a z | rs -g 0 8"
|
||
.Pp
|
||
̵¸Â¤Ë¡¢
|
||
.Em yes
|
||
¤ò½Ð¤·¤¿¤¤¾ì¹ç¤Ï¡¢°Ê²¼¤Î¤è¤¦¤Ë¤·¤Þ¤¹¡£
|
||
.Dl jot -b yes 0
|
||
.Pp
|
||
.Xr ed 1
|
||
¤ÎÃÖ´¹¥³¥Þ¥ó¥É¤ò¡¢30 ²ó¡¢2, 7, 12 ¹ÔÅù¤Î¤è¤¦¤Ë (5 ¹ÔËè¤Ë ) ŬÍѤ¹¤ë¾ì¹ç¤Î
|
||
²òÅúÎã¤Ï°Ê²¼¤Î¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£
|
||
.\"(ÌõÃæ)(5 ¹ÔËè¤Ë )¤ÏÌõ¼Ô¤¬ÁÞÆþ¤·¤Þ¤·¤¿¡£
|
||
.\" 2.2.1R ÂоÝ(1997/05/06) Takeshi MUTOH <mutoh@info.nara-k.ac.jp>
|
||
.Dl jot -w %ds/old/new/ 30 2 - 5
|
||
.Pp
|
||
¤À¤Ö¤ê¤Î¤¢¤ë 9, 9, 8, 8, 7 ¤ÎÍͤÊÎó¤Ï¡¢
|
||
°Ê²¼¤Î¤è¤¦¤ËŬÀڤ˥¹¥Æ¥Ã¥×¤ÎÂ礤µ¤òÀßÄꤹ¤ë¤³¤È¤Ç¡¢¼Â¸½¤Ç¤¤Þ¤¹¡£
|
||
.Dl jot - 9 0 -.5
|
||
.Pp
|
||
¥Õ¥¡¥¤¥ë¤¬Àµ³Î¤Ë 1024 ¥Ð¥¤¥È¤Ç¤¢¤ë¤è¤¦¤ËºîÀ®¤¹¤ë¤Ë¤Ï¡¢
|
||
.Dl jot -b x 512 > block
|
||
.Pp
|
||
ºÇ¸å¤Ë¡¢¥¿¥Ö¤ò 4 ¤Ä¤Î¥¹¥Ú¡¼¥¹¤ËÀßÄꤷ¡¢10 ¥«¥é¥àÌܤ«¤é¤Ï¤¸¤Þ¤Ã¤Æ¡¢
|
||
132 ¥«¥é¥àÌܤǽª¤ë¤è¤¦¤Ë¤¹¤ë¤Ë¤Ï¡¢°Ê²¼¤Î¤è¤¦¤Ë¤·¤Þ¤¹¡£
|
||
.Dl expand -`jot -s, - 10 132 4`
|
||
.Pp
|
||
80 ʸ»ú°Ê¾å¤Î¹Ô¤òÁ´¤Æɽ¼¨¤¹¤ë¤Ë¤Ï¡¢°Ê²¼¤ò»È¤Ã¤Æ¤¯¤À¤µ¤¤¡£
|
||
.Dl grep `jot -s \&"\&" -b \&. 80`
|
||
.Sh ¿ÇÃÇ
|
||
.Ex -std
|
||
¼¡¤Î¿ÇÃÇ¥á¥Ã¥»¡¼¥¸¤Ï¡¢ÆÃÊ̤ʲòÀâ¤òÍפ·¤Þ¤¹:
|
||
.Bl -diag
|
||
.It "illegal or unsupported format '%s'"
|
||
.Xr printf 3
|
||
ÍѤËÍ׵ᤵ¤ì¤¿ÊÑ´¹½ñ¼°»Ø¼¨»Ò¤Ï¡¢
|
||
.Dl %[#][ ][{+,-}][0-9]*[.[0-9]*]?
|
||
¤Î½ñ¼°¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¤Ç¤·¤¿¡£
|
||
¤³¤³¤Ç
|
||
.Dq ?\&
|
||
¤Ï
|
||
.Dl [l]{d,i,o,u,x}
|
||
¤Þ¤¿¤Ï
|
||
.Dl {c,e,f,g,D,E,G,O,U,X}
|
||
¤Î¤¤¤º¤ì¤«¤Ò¤È¤Ä¤Ç¤¹¡£
|
||
.It "range error in conversion"
|
||
ɽ¼¨¤¹¤Ù¤Ãͤϡ¢Í׵ᤵ¤ì¤¿½ÐÎϽñ¼°¤Ë´ØÏ¢ÉÕ¤±¤é¤ì¤¿¥Ç¡¼¥¿¥¿¥¤¥×¤Î
|
||
Èϰϳ°¤Î·ë²Ì¤Ë¤Ê¤ê¤Þ¤·¤¿¡£
|
||
.It "too many conversions"
|
||
1 ¸Ä¤·¤«µö¤µ¤ì¤Ê¤¤¤È¤³¤í¤ò¡¢Ê£¿ô¤ÎÊÑ´¹½ñ¼°»Ø¼¨»Ò¤¬»ØÄꤵ¤ì¤Þ¤·¤¿¡£
|
||
.El
|
||
.Sh ´ØÏ¢¹àÌÜ
|
||
.Xr ed 1 ,
|
||
.Xr expand 1 ,
|
||
.Xr rs 1 ,
|
||
.Xr yes 1 ,
|
||
.Xr printf 3 ,
|
||
.Xr random 3
|