2 .\" sed.1 - the *roff document processor source for the sed manual
4 .\" This file is part of GNU sed.
5 .\" Copyright (C) 1998 Free Software Foundation, Inc.
7 .\" This program is free software; you can redistribute it and/or modify
8 .\" it under the terms of the GNU General Public License as published by
9 .\" the Free Software Foundation; either version 2, or (at your option)
10 .\" any later version.
12 .\" This program is distributed in the hope that it will be useful,
13 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
14 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 .\" GNU General Public License for more details.
17 .\" You should have received a copy of the GNU General Public License
18 .\" along with this program; if not, write to the Free Software
19 .\" Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
21 .\" Japanese Version Copyright (c) 2001 NAKANO Takeo all rights reserved.
22 .\" Translated Mon 7 May 2001 by NAKANO Takeo <nakano@apm.seikei.ac.jp>
24 .TH SED 1 "1998-05-07" "GNU Project"
28 .\"O sed \- a Stream EDitor
30 sed \- ¥¹¥È¥ê¡¼¥à¥¨¥Ç¥£¥¿
34 sed [-n] [-V] [--quiet] [--silent] [--version] [--help]
35 [-e script] [--expression=script]
36 [-f script-file] [--file=script-file]
37 [script-if-no-other-script]
42 .\"O \*(Sd is a stream editor.
43 .\"O A stream editor is used to perform basic text
44 .\"O transformations on an input stream
45 .\"O (a file or input from a pipeline).
46 .\"O While in some ways similar to an editor which
47 .\"O permits scripted edits (such as \fIed\fP),
48 .\"O \*(sd works by making only one pass over the
49 .\"O input(s), and is consequently more efficient.
50 .\"O But it is \*(sd's ability to filter text in a pipeline
51 .\"O which particularly distinguishes it from other types of
53 \*(sd ¤Ï¥¹¥È¥ê¡¼¥à¥¨¥Ç¥£¥¿¤Ç¤¢¤ë¡£
54 ¥¹¥È¥ê¡¼¥à¥¨¥Ç¥£¥¿¤Ï¡¢ÆþÎÏ¥¹¥È¥ê¡¼¥à
55 (¥Õ¥¡¥¤¥ë¤Þ¤¿¤Ï¥Ñ¥¤¥×¥é¥¤¥ó¤«¤é¤ÎÆþÎÏ)
56 ¤ËÂФ·¤Æ´ðËÜŪ¤Ê¥Æ¥¥¹¥ÈÊÑ´¹¤ò¹Ô¤¦¤¿¤á¤ËÍѤ¤¤é¤ì¤ë¡£
58 ÊÔ½¸¥¹¥¯¥ê¥×¥È¤ò»È¤¨¤ë (\fIed\fP ¤Î¤è¤¦¤Ê) ¥¨¥Ç¥£¥¿¤È
59 ¤¤¤í¤¤¤í¤ÊÌ̤ǻ÷¤Æ¤¤¤ë¤¬¡¢
60 \*(sd ¤ÏÆþÎϤËÂФ·¤Æ 1 ¥Ñ¥¹¤À¤±¤ÇÆ°ºî¤¹¤ë¤Î¤Ç¡¢¤è¤ê¸úΨŪ¤Ç¤¢¤ë¡£
61 ¤Þ¤¿ \*(sd ¤Ï¥Ñ¥¤¥×¥é¥¤¥ó¤Î¥Æ¥¥¹¥È¤ËÂФ·¤Æ¥Õ¥£¥ë¥¿Æ°ºî¤ò¹Ô¤¦¤³¤È¤¬¤Ç¤¡¢
62 ¤³¤ÎÅÀ¤Ï¾¤Î¥¿¥¤¥×¤Î¥¨¥Ç¥£¥¿¤È¤Ï¤Ã¤¤ê°ã¤¦¡£
66 .\"O \*(Sd may be invoked with the following command-line options:
67 \*(sd ¤Îµ¯Æ°»þ¤Ë¤Ï°Ê²¼¤Î¥³¥Þ¥ó¥É¥é¥¤¥ó¥ª¥×¥·¥ç¥ó¤ò»ØÄê¤Ç¤¤ë¡£
72 .\"O Print out the version of sed that is being run and a copyright notice,
74 sed ¤Î¥Ð¡¼¥¸¥ç¥ó¡¦Ãøºî¸¢É½¼¨¤ò½ÐÎϤ·¡¢½ªÎ»¤¹¤ë¡£
79 .\"O Print a usage message briefly summarizing these command-line options
80 .\"O and the bug-reporting address,
82 ¥³¥Þ¥ó¥É¥é¥¤¥ó¥ª¥×¥·¥ç¥ó¤ò´Êñ¤Ë¤Þ¤È¤á¤¿ÍøÍÑË¡¤È
83 ¥Ð¥°¥ì¥Ý¡¼¥ÈÀè¤Î¥¢¥É¥ì¥¹¤ò½ÐÎϤ·¡¢½ªÎ»¤¹¤ë¡£
90 .\"O By default, \*(sd will print out the pattern space
91 .\"O at the end of each cycle through the script.
92 .\"O These options disable this automatic printing,
93 .\"O and \*(sd will only produce output when explicitly told to
98 \*(sd ¤Ï¥¹¥¯¥ê¥×¥È¤Î³Æ¥µ¥¤¥¯¥ë¤ÎºÇ¸å¤Ç¥Ñ¥¿¡¼¥ó¥¹¥Ú¡¼¥¹¤ÎÆâÍƤò½ÐÎϤ¹¤ë¡£
99 ¤³¤ì¤é¤Î¥ª¥×¥·¥ç¥ó¤ò»ØÄꤹ¤ë¤È¤³¤Î¼«Æ°Åª¤Ê½ÐÎϤ¬¹Ô¤ï¤ì¤Ê¤¯¤Ê¤ê¡¢
101 ¥³¥Þ¥ó¥É¤Ç½ÐÎϤ¹¤ë¤³¤È¤ò»ØÄꤵ¤ì¤¿¾ì¹ç¤Ë¸Â¤Ã¤Æ
102 \*(sd ¤Ï½ÐÎϤòÀ¸À®¤¹¤ë¡£
106 .BI --expression= script
107 .\"O Add the commands in
109 .\"O to the set of commands to be run while processing the input.
111 ¤Î¥³¥Þ¥ó¥É¤ò¡¢ÆþÎϤνèÍýÃæ¤Ë¹Ô¤ï¤ì¤ë¥³¥Þ¥ó¥É¥»¥Ã¥È¤ËÄɲ乤롣
113 .B -f \fIscript-file\fP
115 .BI --file= script-file
116 .\"O Add the commands contained in the file
118 .\"O to the set of commands to be run while processing the input.
121 ¤Ë´Þ¤Þ¤ì¤ë¥³¥Þ¥ó¥É¤ò¡¢ÆþÎϤνèÍýÃæ¤Ë¹Ô¤ï¤ì¤ë¥³¥Þ¥ó¥É¥»¥Ã¥È¤ËÄɲ乤롣
124 .\"O .BR -e , -f , --expression ,
127 .\"O options are given on the command-line,
128 .\"O then the first non-option argument on the command line is
132 .BR -e ", " -f ", " --expression ", " --file
133 ¤Ê¤É¤Î¥ª¥×¥·¥ç¥ó¤¬¥³¥Þ¥ó¥É¥é¥¤¥ó¤«¤éÁ´¤¯Í¿¤¨¤é¤ì¤Ê¤«¤Ã¤¿¾ì¹ç¤Ï¡¢
134 ¥³¥Þ¥ó¥É¥é¥¤¥ó¤Î°ú¤¿ô¤Î¤¦¤Á¡¢¥ª¥×¥·¥ç¥ó¤Ç¤Ê¤¤ºÇ½é¤Î¤â¤Î¤¬
136 ¤È¤·¤Æ¼õ¤±¼è¤é¤ì¡¢¼Â¹Ô¤µ¤ì¤ë¡£
138 .\"O If any command-line parameters remain after processing the above,
139 .\"O these parameters are interpreted as the names of input files to
143 .\"O refers to the standard input stream.
144 .\"O The standard input will processed if no file names are specified.
145 °Ê¾å¤Î¥³¥Þ¥ó¥É¥é¥¤¥ó¥Ñ¥é¥á¡¼¥¿¤ò½èÍý¤·¤¿¤¢¤È¤Ë°ú¤¿ô¤¬»Ä¤Ã¤¿¾ì¹ç¤Ï¡¢
146 ¤½¤ì¤é¤Ï½èÍýÂоݤȤʤëÆþÎÏ¥Õ¥¡¥¤¥ë¤Î¥Õ¥¡¥¤¥ë̾¤È²ò¼á¤µ¤ì¤ë¡£
148 ¤È¤¤¤¦¥Õ¥¡¥¤¥ë̾¤Ï¡¢É¸½àÆþÎÏ¥¹¥È¥ê¡¼¥à¤ò»²¾È¤¹¤ë¡£
149 ¥Õ¥¡¥¤¥ë̾¤¬Á´¤¯»ØÄꤵ¤ì¤Ê¤«¤Ã¤¿¾ì¹ç¤Ïɸ½àÆþÎϤò½èÍý¤¹¤ë¡£
152 .\"O Command Synopsis
154 .\"O This is just a brief synopsis of \*(sd commands to serve as
155 .\"O a reminder to those who already know sed;
156 .\"O other documentation (such as the texinfo document)
157 .\"O must be consulted for fuller descriptions.
158 ¤³¤ì¤Ï \*(sd ¥³¥Þ¥ó¥É¤Î¤´¤¯´Êñ¤Êʸˡ¤Ç¡¢
159 ´û¤Ë sed ¤òÃΤäƤ¤¤ë¿Í¤ËÂФ¹¤ëÈ÷˺ϿÄøÅ٤Τâ¤Î¤Ç¤¢¤ë¡£
160 ´°Á´¤Êµ½Ò¤òµá¤á¤ë¾ì¹ç¤Ï¾¤Îʸ½ñ (texinfo ʸ½ñ¤Ê¤É) ¤Ë¤¢¤¿¤ë¤³¤È¡£
162 .\"O Zero-address ``commands''
163 .SS ¥¢¥É¥ì¥¹¤ò¼è¤é¤Ê¤¤¥³¥Þ¥ó¥É
177 .\"O The comment extends until the next newline (or the end of a
179 .\"O script fragment).
180 ¼¡¤Î²þ¹Ôʸ»ú¤Þ¤Ç (¤¢¤ë¤¤¤Ï
182 ¥¹¥¯¥ê¥×¥È¥Õ¥é¥°¥á¥ó¥È¤ÎËöÈø¤Þ¤Ç) ¤ò¥³¥á¥ó¥È¤È¤·¤Æ¼è¤ê°·¤¦¡£
185 .\"O The closing bracket of a { } block.
186 { } ¥Ö¥í¥Ã¥¯¤ÎÊĤ¸³ç¸Ì¡£
188 .\"O Zero- or One- address commands
189 .SS ¥¢¥É¥ì¥¹¤ò 0 ¤Þ¤¿¤Ï 1 ¸Ä¤È¤ë¥³¥Þ¥ó¥É
192 .\"O Print the current line number.
193 ¸½ºß¤Î¹ÔÈÖ¹æ¤òɽ¼¨¤¹¤ë¡£
200 .\"O which has each embedded newline preceeded by a backslash.
204 ¤Ë²þ¹Ô¤ò´Þ¤á¤¿¤¤¾ì¹ç¤Ï¡¢¤½¤ÎÁ°¤Ë¥Ð¥Ã¥¯¥¹¥é¥Ã¥·¥å¤òÃÖ¤¯¡£
211 .\"O which has each embedded newline preceeded by a backslash.
215 ¤Ë²þ¹Ô¤ò´Þ¤á¤¿¤¤¾ì¹ç¤Ï¡¢¤½¤ÎÁ°¤Ë¥Ð¥Ã¥¯¥¹¥é¥Ã¥·¥å¤òÃÖ¤¯¡£
218 .\"O Immediately quit the \*(sd script without processing
220 .\"O except that if auto-print is not diabled
221 .\"O the current pattern space will be printed.
222 ¤³¤ì°Ê¾åÆþÎϤνèÍý¤ò¹Ô¤ï¤º¡¢¤¿¤À¤Á¤Ë \*(sd ¥¹¥¯¥ê¥×¥È¤Î½èÍý¤ò½ªÎ»¤¹¤ë¡£
223 ¤¿¤À¤· auto-print ¤¬ diable ¤µ¤ì¤Æ¤¤¤Ê¤±¤ì¤Ð¡¢
224 ¥«¥ì¥ó¥È¤Î¥Ñ¥¿¡¼¥ó¥¹¥Ú¡¼¥¹¤¬½ÐÎϤµ¤ì¤ë¡£
227 .\"O Append text read from
233 .\"O Commands which accept address ranges
234 .SS ¥¢¥É¥ì¥¹ÈϰϤò¤È¤ê¤¦¤ë¥³¥Þ¥ó¥É
237 .\"O Begin a block of commands (end with a }).
238 ¥³¥Þ¥ó¥É¥Ö¥í¥Ã¥¯¤Î³«»Ï (} ¤Ç½ªÎ»¤¹¤ë)¡£
245 .\"O is omitted, branch to end of script.
249 ¤¬¾Êά¤µ¤ì¤¿¾ì¹ç¤Ï¡¢¥¹¥¯¥ê¥×¥È¤ÎËöÈø¤Ëʬ´ô¤¹¤ë¡£
252 .\"O If a s/// has done a successful substitution since the
253 .\"O last input line was read and since the last t command,
258 .\"O is omitted, branch to end of script.
259 ºÇ¸å¤ËÆþÎϹԤ¬Æɤޤ졢ºÇ¸å¤Ë t ¥³¥Þ¥ó¥É¤¬¹Ô¤ï¤ì¤Æ°Ê¹ß¤Ë
260 s/// ¤¬À®¸ù¤·¤Æ¤¤¤ì¤Ð¡¢
264 ¤¬¾Êά¤µ¤ì¤¿¾ì¹ç¤Ï¡¢¥¹¥¯¥ê¥×¥È¤ÎËöÈø¤Ëʬ´ô¤¹¤ë¡£
269 .\"O Replace the selected lines with
271 .\"O which has each embedded newline preceeded by a backslash.
276 ¤Ë²þ¹Ô¤ò´Þ¤á¤¿¤¤¾ì¹ç¤Ï¡¢¤½¤ÎÁ°¤Ë¥Ð¥Ã¥¯¥¹¥é¥Ã¥·¥å¤òÃÖ¤¯¡£
279 .\"O Delete pattern space.
280 .\"O Start next cycle.
281 ¥Ñ¥¿¡¼¥ó¥¹¥Ú¡¼¥¹¤òºï½ü¤¹¤ë¡£
282 ¼¡¤Î¥µ¥¤¥¯¥ë¤ò³«»Ï¤¹¤ë¡£
285 .\"O Delete up to the first embedded newline in the pattern space.
286 .\"O Start next cycle, but skip reading from the input
287 .\"O if there is still data in the pattern space.
288 ¥Ñ¥¿¡¼¥ó¥¹¥Ú¡¼¥¹¤ÎºÇ½é¤Î²þ¹Ô¤Þ¤Ç¤òºï½ü¤¹¤ë¡£
289 ¼¡¤Î¥µ¥¤¥¯¥ë¤ò³«»Ï¤¹¤ë¤¬¡¢
290 ¥Ñ¥¿¡¼¥ó¥¹¥Ú¡¼¥¹¤Ë¤Þ¤À¥Ç¡¼¥¿¤¬»Ä¤Ã¤Æ¤¤¤¿¤é¡¢
291 ÆþÎϤ«¤é¤ÎÆɤ߹þ¤ß¤ò¥¹¥¥Ã¥×¤¹¤ë¡£
294 .\"O Copy/append pattern space to hold space.
295 ¥Ñ¥¿¡¼¥ó¥¹¥Ú¡¼¥¹¤ò¥Û¡¼¥ë¥É¥¹¥Ú¡¼¥¹¤Ë¥³¥Ô¡¼/Äɲ乤롣
298 .\"O Copy/append hold space to pattern space.
299 ¥Û¡¼¥ë¥É¥¹¥Ú¡¼¥¹¤ò¥Ñ¥¿¡¼¥ó¥¹¥Ú¡¼¥¹¤Ë¥³¥Ô¡¼/Äɲ乤롣
302 .\"O Exchange the contents of the hold and pattern spaces.
303 ¥Û¡¼¥ë¥É¥¹¥Ú¡¼¥¹¤È¥Ñ¥¿¡¼¥ó¥¹¥Ú¡¼¥¹¤ÎÆâÍƤò¸ò´¹¤¹¤ë¡£
306 .\"O List out the current line in a ``visually unambiguous'' form.
307 ¸½ºß¤Î¹Ô¤ò¡Ö»ë³ÐŪ¤Ëʶ¤ì¤Î¤Ê¤¤¡×·Á¼°¤Ç¥ê¥¹¥È¤¹¤ë¡£
310 .\"O Read/append the next line of input into the pattern space.
311 ÆþÎϤμ¡¤Î¹Ô¤ò¥Ñ¥¿¡¼¥ó¥¹¥Ú¡¼¥¹¤ËÆɤ߹þ¤à/Äɲ乤롣
314 .\"O Print the current pattern space.
315 ¸½ºß¤Î¥Ñ¥¿¡¼¥ó¥¹¥Ú¡¼¥¹¤ò½ÐÎϤ¹¤ë¡£
318 .\"O Print up to the first embedded newline of the current pattern space.
319 ¸½ºß¤Î¥Ñ¥¿¡¼¥ó¥¹¥Ú¡¼¥¹¤ÎºÇ½é¤Î²þ¹Ô¤Þ¤Ç¤ò½ÐÎϤ¹¤ë¡£
321 .RI s/ regexp / replacement /
322 .\"O Attempt to match
324 .\"O against the pattern space.
325 ¥Ñ¥¿¡¼¥ó¥¹¥Ú¡¼¥¹¤ËÂФ·¤Æ
328 .\"O If successful, replace that portion matched
330 .\"O .IR replacement .
331 ¥Þ¥Ã¥Á¤ËÀ®¸ù¤¹¤ë¤È¡¢¥Þ¥Ã¥Á¤·¤¿Éôʬ¤ò
336 .\"O may contain the special character
338 .\"O to refer to that portion of the pattern space which matched,
339 .\"O and the special escapes \e1 through \e9 to refer to the
340 .\"O corresponding matching sub-expressions in the
345 ¤ò´Þ¤à¤³¤È¤¬¤Ç¤¡¢¤³¤ì¤Ï¥Ñ¥¿¡¼¥ó¥¹¥Ú¡¼¥¹¤Î¥Þ¥Ã¥Á¤·¤¿Éôʬ¤ò»²¾È¤¹¤ë¡£
346 ¤Þ¤¿ \e1 ¤«¤é \e9 ¤Þ¤Ç¤ÎÆü쥨¥¹¥±¡¼¥×¤ò´Þ¤à¤³¤È¤â¤Ç¤¡¢
349 ¤ÎÉûɽ¸½ (sub-expression) ¤Ë¥Þ¥Ã¥Á¤·¤¿Éôʬ¤ò¤½¤ì¤¾¤ì»²¾È¤¹¤ë¡£
353 .\"O Write the current pattern space to
355 ¸½ºß¤Î¥Ñ¥¿¡¼¥ó¥¹¥Ú¡¼¥¹¤ò
359 .RI y/ source / dest /
360 .\"O Transliterate the characters in the pattern space which appear in
362 .\"O to the corresponding character in
364 ¥Ñ¥¿¡¼¥ó¥¹¥Ú¡¼¥¹¤Ë¤¢¤ëʸ»ú¤Î¤¦¤Á¡¢
368 ¤ÎƱ¤¸°ÌÃ֤ˤ¢¤ëʸ»ú¤Ë¸ò´¹¤¹¤ë¡£
372 .\"O \*(Sd commands can be given with no addresses, in which
373 .\"O case the command will be executed for all input lines;
374 .\"O with one address, in which case the command will only be executed
375 .\"O for input lines which match that address; or with two
376 .\"O addresses, in which case the command will be executed
377 .\"O for all input lines which match the inclusive range of
378 .\"O lines starting from the first address and continuing to
379 .\"O the second address.
380 \*(sd ¤Î¥³¥Þ¥ó¥É¤Ï¥¢¥É¥ì¥¹¤ò»ØÄꤻ¤º¤ËÍ¿¤¨¤ë¤³¤È¤â¤Ç¤¡¢
381 ¤³¤Î¾ì¹ç¤½¤Î¥³¥Þ¥ó¥É¤Ï¤¹¤Ù¤Æ¤ÎÆþÎϹԤËÂФ·¤Æ¼Â¹Ô¤µ¤ì¤ë¡£
382 ¥¢¥É¥ì¥¹¤ò¤Ò¤È¤ÄÍ¿¤¨¤ë¤È¡¢
383 ¥³¥Þ¥ó¥É¤Ï¤½¤Î¥¢¥É¥ì¥¹¤Ë¥Þ¥Ã¥Á¤·¤¿ÆþÎϹԤËÂФ·¤Æ¤Î¤ß¼Â¹Ô¤µ¤ì¤ë¡£
384 2 ¤Ä¤Î¥¢¥É¥ì¥¹¤òÍ¿¤¨¤ë¤È¡¢ºÇ½é¤Î¥¢¥É¥ì¥¹¤Ë¥Þ¥Ã¥Á¤·¤¿¹Ô¤«¤é¡¢
385 2 ÈÖÌܤΥ¢¥É¥ì¥¹¤Ë¥Þ¥Ã¥Á¤·¤¿¹Ô¤Ë»ê¤ëÈÏ°Ï (ξ¥Þ¥Ã¥Á¹Ô¤ò´Þ¤à)
386 ¤Ë¤¢¤ë¤¹¤Ù¤Æ¤Î¹Ô¤ËÂФ·¤Æ¼Â¹Ô¤µ¤ì¤ë¡£
387 .\"O Three things to note about address ranges:
389 .\"O .IR addr1 , addr2
390 .\"O (i.e., the addresses are separated by a comma);
393 .\"O matched will always be accepted,
396 .\"O selects an earlier line;
401 .\"O it will not be tested against the line that
404 ¥¢¥É¥ì¥¹¤ÎÈÏ°Ï»ØÄê¤Ë¤Ä¤¤¤Æ¤Ï 3 ¤Ä¤Î¤³¤È¤òÃí°Õ¤·¤Æ¤ª¤¯¡£
407 ¤Ç¤¢¤ë (¤Ä¤Þ¤ê¥¢¥É¥ì¥¹¤ò¥³¥ó¥Þ¤Ç¶èÀÚ¤ë)¡£
409 ¤Ë¥Þ¥Ã¥Á¤·¤¿¹Ô¤Ï¡¢¤¿¤È¤¨
411 ¤¬¤è¤êÁ°¤Î¹Ô¤Ë¥Þ¥Ã¥Á¤·¤¿¾ì¹ç¤Ç¤â¡¢¾ï¤Ë½èÍýÂоݤȤʤ롣
415 (Àµµ¬É½¸½) ¤Î¾ì¹ç¤Ë¤Ï¡¢
417 ¤Ë¥Þ¥Ã¥Á¤·¤¿¹Ô¤ËÂФ·¤Æ¤Ï
419 ¤Î¥Þ¥Ã¥Á¤Ï¹Ô¤ï¤ì¤Ê¤¤¡£
421 .\"O After the address (or address-range),
422 .\"O and before the command, a
424 .\"O may be inserted,
425 .\"O which specifies that the command shall only be
426 .\"O executed if the address (or address-range) does
429 ¥¢¥É¥ì¥¹ (¤¢¤ë¤¤¤Ï¥¢¥É¥ì¥¹ÈÏ°Ï) ¤È¥³¥Þ¥ó¥É¤Î´Ö¤Ë¤Ï
431 ¤ò¶´¤à¤³¤È¤¬¤Ç¤¤ë¡£¤³¤Î¾ì¹ç¤Ï¡¢¥¢¥É¥ì¥¹ (¤¢¤ë¤¤¤Ï¥¢¥É¥ì¥¹ÈÏ°Ï) ¤¬
432 \fB¥Þ¥Ã¥Á¤·¤Ê¤«¤Ã¤¿\fP¹Ô¤ËÂФ·¤Æ¤Î¤ß¥³¥Þ¥ó¥É¤¬¼Â¹Ô¤µ¤ì¤ë¡£
434 .\"O The following address types are supported:
435 °Ê²¼¤Î¥¢¥É¥ì¥¹¥¿¥¤¥×¤¬¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤ë¡£
438 .\"O Match only the specified line
441 ¤Ç»ØÄꤷ¤¿¹Ô¤À¤±¤Ë¥Þ¥Ã¥Á¤¹¤ë¡£
446 .\"O line starting with line
448 .\"O For example, ``sed -n 1~2p'' will print all the odd-numbered lines in
449 .\"O the input stream, and the address 2~5 will match every fifth line,
450 .\"O starting with the second.
451 .\"O (This is a GNU extension.)
455 ¹Ô¤ª¤¤Î¹Ô¤Ë¥Þ¥Ã¥Á¤¹¤ë¡£Î㤨¤Ð ``sed -n 1~2p'' ¤Ï
456 ÆþÎϹԤΤ¦¤Á´ñ¿ô¹Ô¤òɽ¼¨¤·¡¢¥¢¥É¥ì¥¹¤ò 2~5 ¤Ë¤¹¤ë¤È¡¢
457 Âè 2 ¹Ô¤«¤é 5 ¹Ô¤ª¤¤Ëɽ¼¨¤¹¤ë (¤³¤ì¤Ï GNU ¤Î³ÈÄ¥¤Ç¤¢¤ë)¡£
460 .\"O Match the last line.
464 .\"O Match lines matching the regular expression
468 ¤Ë¥Þ¥Ã¥Á¤·¤¿¹Ô¤Ë¥Þ¥Ã¥Á¤¹¤ë¡£
470 .BI \fR\e\fPc regexp c
471 .\"O Match lines matching the regular expression
475 .\"O may be any character.
478 ¤Ë¥Þ¥Ã¥Á¤·¤¿¹Ô¤Ë¥Þ¥Ã¥Á¤¹¤ë¡£
483 .\"O Regular expressions
487 .\"O be supported, but they aren't completely yet.
490 .\"O sequence in a regular expression matches the newline character.
491 .\"O There are also some GNU extensions.
492 .\"O [XXX FIXME: more needs to be said.
493 .\"O At the very least, a reference to another document which
494 .\"O describes what is supported should be given.]
496 ¤ò¥µ¥Ý¡¼¥È¤¹¤Ù¤¤Ç¤¢¤ë¤¬¡¢¤Þ¤À´°Á´¤Ë¤Ï¥µ¥Ý¡¼¥È¤Ç¤¤Æ¤¤¤Ê¤¤¡£
499 ¥·¡¼¥±¥ó¥¹¤Ï²þ¹Ôʸ»ú¤Ë¥Þ¥Ã¥Á¤¹¤ë¡£
501 [Í×½¤Àµ: ¤è¤ê¾ÜºÙ¤òµ½Ò¤¹¤ëɬÍפ¬¤¢¤ë¡£
502 ¾¯¤Ê¤¯¤È¤â¡¢²¿¤¬¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤ë¤«¤ò½Ò¤Ù¤¿¡¢
503 ¾¤Îʸ½ñ¤Ø¤Î¥ê¥Õ¥¡¥ì¥ó¥¹¤¬É¬ÍפǤ¢¤ë]
505 .\"O Miscellaneous notes
507 .\"O This version of sed supports a
508 .\"O .RB \e <newline>
510 .\"O all regular expressions, the
512 .\"O part of a substitute (s) command, and in the
516 .\"O parts of a transliterate (y) command.
517 .\"O The \e is stripped, and the newline is kept.
518 ¤³¤Î¥Ð¡¼¥¸¥ç¥ó¤Î sed ¤Ï¡¢
519 ¤¢¤é¤æ¤ëÀµµ¬É½¸½¤ÎÆâÉô¡¦ÃÖ´¹¥³¥Þ¥ó¥É¤Î
521 ¤ÎÆâÉô¡¦Ê¸»ú¸ò´¹ (y) ¥³¥Þ¥ó¥É¤Î
525 ¤ÎÆâÉô¤Î¤¤¤º¤ì¤Ë¤ª¤¤¤Æ¤â¡¢
527 ¤È¤¤¤¦¥·¡¼¥±¥ó¥¹¤¬»È¤¨¤ë¡£
541 .\"O to be written... XXX],
542 [¤¦¡¼¤ó¡¢½ñ¤«¤Ê¤¤¤È¥À¥á¤Ç¤¹¤Í¤¨]
547 .\"O any of various books on \*(sd,
548 \*(sd ¤Ë´Ø¤¹¤ëÍÍ¡¹¤ÊËܤΤ¤¤º¤ì¤«,
550 the \*(sd FAQ (http://www.wollery.demon.co.uk/sedtut10.txt,
551 http://www.ptug.org/sed/sedfaq.htm).
556 .\"O E-mail bug reports to
557 .\"O .BR bug-gnu-utils@gnu.org .
558 .\"O Be sure to include the word ``sed'' somewhere in the ``Subject:'' field.
560 .B bug-gnu-utils@gnu.org
562 ¡ÖSubject:¡×¥Õ¥£¡¼¥ë¥É¤Î¤É¤³¤«¤Ë
563 ¡Ösed¡×¤È¤¤¤¦Ã±¸ì¤òÆþ¤ì¤ë¤è¤¦¤Ë¤·¤ÆÍߤ·¤¤¡£