NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/59639: sed(1) man page is wrong about case-insensitivity flag



The following reply was made to PR bin/59639; it has been noted by GNATS.

From: Valery Ushakov <uwe%stderr.spb.ru@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: bin/59639: sed(1) man page is wrong about case-insensitivity flag
Date: Mon, 8 Sep 2025 02:02:44 +0300

 > 	$ echo Foo | sed -e /foo/id
 > 	sed: 1: "/foo/id
 > 	": command i expects \ followed by text
 
 As GNU sed manual points out, it uses 'I', not 'i', b/c GNU sed
 supports alternative syntax for 'i' where the text to be added follows
 after 'i' on the same line:
 
   In many other programming languages, a lower case 'i' is used for
   case-insensitive regular expression matching.  However, in 'sed'
   the 'i' is used for the insert command (*note insert command::).
   ...
 
   $ printf "%s\n" a b c | sed '/b/id'
   a
   d
   b
   c
 
 That's probably worth a mention in the new, fixed text.
 
 -uwe
 


Home | Main Index | Thread Index | Old Index