Fix the last example to really replace all occurrences of the search string

in the file by adding the global (g) option at the end.  Without it, only the
first match is replaced, subsequent ones are ignored.  The intention of the
example is to demonstrate something else, but adding the g matches the example
to what the description says.

Discussed with:	    brd (on IRC)
MFC after:	    1 week
This commit is contained in:
bcr 2017-04-24 16:52:26 +00:00
parent 82d986e216
commit 9ea8fcf87d

View File

@ -614,7 +614,7 @@ in the file
.Pa test.txt ,
without creating a backup of the file:
.Bd -literal -offset indent
sed -i '' -e 's/foo/bar/' test.txt
sed -i '' -e 's/foo/bar/g' test.txt
.Ed
.Sh SEE ALSO
.Xr awk 1 ,