151 lines
4.5 KiB
Groff
151 lines
4.5 KiB
Groff
.\" Copyright (c) 1980, 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.
|
|
.\"
|
|
.\" @(#)xstr.1 8.2 (Berkeley) 12/30/93
|
|
.\" %FreeBSD: src/usr.bin/xstr/xstr.1,v 1.9 2003/06/09 19:35:56 charnier Exp %
|
|
.\" $FreeBSD$
|
|
.\"
|
|
.Dd December 30, 1993
|
|
.Dt XSTR 1
|
|
.Os
|
|
.Sh ̾¾Î
|
|
.Nm xstr
|
|
.Nd ¶¦Íʸ»úÎó¤ò¼Â¸½¤¹¤ë¤¿¤á¤Ë C ¸À¸ì¥×¥í¥°¥é¥à¤«¤éʸ»úÎó¤òÃê½Ð¤¹¤ë
|
|
.Sh ½ñ¼°
|
|
.Nm
|
|
.Op Fl c
|
|
.Op Fl
|
|
.Op Fl v
|
|
.Op Ar file
|
|
.Sh ²òÀâ
|
|
.Nm
|
|
¥æ¡¼¥Æ¥£¥ê¥Æ¥£¤Ï¡¢
|
|
µðÂç¤Ê¥×¥í¥°¥é¥à¤Îʸ»úÎóÉôʬ¤òÊÝ»ý¤¹¤ë¥Ç¡¼¥¿¥Ù¡¼¥¹¥Õ¥¡¥¤¥ë
|
|
.Pa strings
|
|
¤ò¥á¥ó¥Æ¥Ê¥ó¥¹¤·¤Þ¤¹¡£¥×¥í¥°¥é¥àÃæ¤Îʸ»úÎó¤Ï¶¦ÄÌʸ»úÎó
|
|
¥¨¥ê¥¢¤Ø¤Î»²¾È¤ËÃÖ´¹¤µ¤ì¤Þ¤¹¡£¤³¤ì¤Ë¤è¤ê¡¢¶¦Íʸ»úÎóÄê¿ô¤¬¼Â¸½¤Ç¤¤Þ¤¹¡£
|
|
¤³¤ì¤ÏÆÃ¤Ë read-only ¤Êʸ»úÎó¤Ë͸ú¤Ç¤¹¡£
|
|
.Pp
|
|
¥ª¥×¥·¥ç¥ó¤Ï¡¢°Ê²¼¤Î¤â¤Î¤¬ÍøÍѲÄǽ¤Ç¤¹:
|
|
.Bl -tag -width indent
|
|
.It Fl
|
|
ɸ½àÆþÎϤ«¤é¥½¡¼¥¹¤òÆɤ߹þ¤ß¤Þ¤¹¡£
|
|
.It Fl c
|
|
»ØÄꤵ¤ì¤¿ C ¸À¸ì¥½¡¼¥¹¤Þ¤¿¤Ïɸ½àÆþÎϤ«¤éʸ»úÎó¤òÃê½Ð¤·¡¢
|
|
ʸ»úÎó¤ò (&xstr[number]) ·Á¼°¤ËÊÑ´¹¤·¡¢Å¬Åö¤Ê number ¤ò³ä¤êÅö¤Æ¤Þ¤¹¡£
|
|
ŬÀÚ¤Ê xstr ¤ÎÀë¸À¤¬¥Õ¥¡¥¤¥ë¤ÎÀèƬ¤ËÁÞÆþ¤µ¤ì¤Þ¤¹¡£ÊÑ´¹¤·¤¿ C ¸À¸ì¥½¡¼¥¹
|
|
¤Ï¥Õ¥¡¥¤¥ë
|
|
.Pa x.c
|
|
¤Ë½ÐÎϤµ¤ì¤Þ¤¹¡£Ê¸»úÎó¤Ïʸ»úÎó¥Ç¡¼¥¿¥Ù¡¼¥¹¥Õ¥¡¥¤¥ë
|
|
.Pa strings
|
|
¤Ë³ÊǼ¤µ¤ì¤Þ¤¹¡£
|
|
¤¹¤Ç¤ËƱ¤¸Ê¸»úÎ󤬥ǡ¼¥¿¥Ù¡¼¥¹Ãæ¤Ë¸ºß¤·¤Æ¤¤¤ë¾ì¹ç¡¢
|
|
¤ª¤è¤Ó´û¤Ë¸ºß¤¹¤ëʸ»úÎó¤Î¥µ¥Õ¥£¥Ã¥¯¥¹¤Î¾ì¹ç¡¢
|
|
¥Ç¡¼¥¿¥Ù¡¼¥¹¤ÏÊѹ¹¤µ¤ì¤Þ¤»¤ó¡£
|
|
.It Fl v
|
|
¾éĹ¥â¡¼¥É¡£
|
|
.El
|
|
.Pp
|
|
¥×¥í¥°¥é¥à¤ÎÁ´¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤ò¥³¥ó¥Ñ¥¤¥ë¤·¤¿¸å¡¢
|
|
¶¦ÄÌʸ»úÎóÎΰè¤òÀë¸À¤¹¤ë¥Õ¥¡¥¤¥ë
|
|
.Pa xs.c
|
|
¤ò¡¢°Ê²¼¤Î¤è¤¦¤Ë¥³¥Þ¥ó¥É¤ò¼Â¹Ô¤·¤ÆºîÀ®¤Ç¤¤Þ¤¹¡£
|
|
.Bd -literal -offset indent
|
|
xstr
|
|
.Ed
|
|
.Pp
|
|
¤³¤Î¤¢¤È¤Ç¥Õ¥¡¥¤¥ë
|
|
.Pa xs.c
|
|
¤ò¥³¥ó¥Ñ¥¤¥ë¤·¡¢Â¾¤Î¥ª¥Ö¥¸¥§¥¯¥È¥Õ¥¡¥¤¥ë¤È¥ê¥ó¥¯
|
|
¤·¤Þ¤¹¡£
|
|
.Pa xs.c
|
|
Æâ¤Îʸ»úÎóÇÛÎó¤ò read-only ¤Ë¤Ç¤¤ë¤Ê¤é¤Ð¡¢É¬ÍפÊÎΰè¤È¥¹¥ï¥Ã¥×
|
|
¤Ë¤è¤ë¥ª¡¼¥Ð¥Ø¥Ã¥É¤ò¾¯¤Ê¤¯¤¹¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£
|
|
.Pp
|
|
.Nm
|
|
¤Ï¤Þ¤¿¡¢1 ¤Ä¤Î¥Õ¥¡¥¤¥ë¤Ë¤Î¤ßŬÍѤ¹¤ë¤³¤È¤â¤Ç¤¤Þ¤¹¡£¼¡¤Î¥³¥Þ¥ó¥É
|
|
.Bd -literal -offset indent
|
|
xstr name
|
|
.Ed
|
|
.Pp
|
|
¤Ë¤è¤Ã¤Æ¡¢Æ±¤¸¥Ç¥£¥ì¥¯¥È¥êÆâ¤Î¥Õ¥¡¥¤¥ë
|
|
.Pa strings
|
|
¤òÊѹ¹¤·¤¿¤ê¡¢»²¾È¤¹¤ë¤³¤È¤Ê¤¯¡¢
|
|
.Pa x.c
|
|
¤È
|
|
.Pa xs.c
|
|
¤ò
|
|
ºîÀ®¤·¤Þ¤¹¡£
|
|
.Pp
|
|
C ¸À¸ì¥×¥ê¥×¥í¥»¥Ã¥µ¤Î¤¢¤È¤Ç
|
|
.Nm
|
|
¤ò¼Â¹Ô¤¹¤ë¤Î¤¬ÊØÍø¤Ê¾ì¹ç¡¢¤¢¤ë¤¤¤Ï¤½¤¦¤¹¤ë¤³¤È¤¬É¬Íפʾì¹ç¤¬¤¢¤ê¤Þ¤¹¡£
|
|
¥Þ¥¯¥í¤Ë¤è¤Ã¤Æʸ»úÎó¤¬À¸À®¤µ¤ì¤ë»þ¤Ê¤É¤¬¤½¤¦¤Ç¤¹¡£
|
|
¤³¤Î¤È¤¤Ï°Ê²¼¤Î¤è¤¦¤Ê¥³¥Þ¥ó¥ÉÎó¤ò¼Â¹Ô¤·¤Þ¤¹¡£
|
|
.Pp
|
|
.Bd -literal -offset indent -compact
|
|
cc \-E name.c | xstr \-c \-
|
|
cc \-c x.c
|
|
mv x.o name.o
|
|
.Ed
|
|
.Pp
|
|
.Nm
|
|
¥æ¡¼¥Æ¥£¥ê¥Æ¥£¤Ï¡¢¿·¤·¤¤Ê¸»úÎó¤òÄɲ乤ëɬÍפ¬¤Ê¤¤¤«¤®¤ê¡¢¥Õ¥¡¥¤¥ë
|
|
.Pa strings
|
|
¤ò¹¹¿·¤·¤Þ¤»¤ó¡£¤³¤Î¤¿¤á¡¢
|
|
.Xr make 1
|
|
¤¬ÉÔɬÍפË
|
|
.Pa xs.o
|
|
¤òºî¤êľ¤¹¤³¤È¤ò¤Ê¤¯¤¹¤³¤È¤¬¤Ç¤¤Þ¤¹¡£
|
|
.Sh ´ØÏ¢¥Õ¥¡¥¤¥ë
|
|
.Bl -tag -width /tmp/xsxx* -compact
|
|
.It Pa strings
|
|
ʸ»úÎó¥Ç¡¼¥¿¥Ù¡¼¥¹
|
|
.It Pa x.c
|
|
ÊÑ´¹¸å¤Î¥½¡¼¥¹¥Õ¥¡¥¤¥ë
|
|
.It Pa xs.c
|
|
ÇÛÎó `xstr' ¤òÄêµÁ¤·¤¿ C ¥½¡¼¥¹¥³¡¼¥É
|
|
.It Pa /tmp/xs*
|
|
Ãæ´Ö¥Õ¥¡¥¤¥ë
|
|
.El
|
|
.Sh ´ØÏ¢¹àÌÜ
|
|
.Xr mkstr 1
|
|
.Sh ¥Ð¥°
|
|
¤¢¤ëʸ»úÎó¤¬Â¾¤Îʸ»úÎó¤Î¥µ¥Õ¥£¥Ã¥¯¥¹¤Ç¤¢¤ê¡¢¤«¤Äû¤¤¤Û¤¦¤Îʸ»úÎó¤Î¤Û¤¦¤¬Àè¤Ë
|
|
.Nm
|
|
¤Ë¤è¤Ã¤Æ½èÍý¤µ¤ì¤¿¤Ê¤é¡¢
|
|
¤¿¤È¤¨¡¢Ä¹¤¤¤Û¤¦¤Îʸ»úÎó¤Î¤ß¤ò³ÊǼ¤¹¤ì¤Ð¤è¤¤¾ì¹ç¤Ë¤â¡¢
|
|
ξÊý¤Îʸ»úÎ󤬥ǡ¼¥¿¥Ù¡¼¥¹ strings ¤Ë³ÊǼ¤µ¤ì¤Þ¤¹¡£
|
|
.Sh Îò»Ë
|
|
.Nm
|
|
¤Ï
|
|
.Bx 3.0
|
|
¤ÇÄɲ䵤ì¤Þ¤·¤¿¡£
|