Skip to main content
6 events
when toggle format what by license comment
Feb 22, 2017 at 8:08 comment added Stéphane Chazelas @oliv, in most sed implementations, :1;s... would define a label called 1;s... instead of one called 1 followed by a s command (hence the need for two -es). That even used to be required by POSIX making GNU sed (which honours the ; as a command separator instead of being part of the label name even in POSIX mode) non-compliant then. POSIX still requires you to not use ; after the : command, but does not require anymore sed implementations to treat ; as being part of the label name anymore.
Feb 22, 2017 at 7:01 comment added oliv @StéphaneChazelas Are you using 2 separated -e in the sed command on purpose? Why not simply joining both: -e ':1;s/\(Word: *[^ ]*\)[^ *]/\1*/;t1'?
Feb 21, 2017 at 22:17 history edited Stéphane Chazelas CC BY-SA 3.0
added 363 characters in body
Feb 21, 2017 at 18:34 comment added don_crissti and, as a bonus, this will work with multiple Words on the same line as opposed to most other solutions here...
Feb 21, 2017 at 16:22 review Low quality posts
Feb 21, 2017 at 16:35
Feb 21, 2017 at 16:02 history answered Stéphane Chazelas CC BY-SA 3.0