Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F165097511
D9958.id26143.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
785 B
Referenced Files
None
Subscribers
None
D9958.id26143.diff
View Options
Index: sed.1
===================================================================
--- sed.1
+++ sed.1
@@ -31,7 +31,7 @@
.\" @(#)sed.1 8.2 (Berkeley) 12/30/93
.\" $FreeBSD$
.\"
-.Dd May 10, 2016
+.Dd March 09, 2017
.Dt SED 1
.Os
.Sh NAME
@@ -586,6 +586,23 @@
.Xr environ 7 .
.Sh EXIT STATUS
.Ex -std
+.Sh EXAMPLES
+Replace bar with baz when piped from another command:
+.Bd -literal -offset indent
+echo bar | sed 's/bar/baz/'
+.Ed
+.Pp
+The same as above, but using a different separator:
+.Bd -literal -offset indent
+echo bar | sed 's#bar#baz#'
+.Ed
+.Pp
+To replace all occurances of foo with bar in the file test.txt, but do not
+create a backup of the file:
+.Bd -literal -offset indent
+sed -i '' -e 's/foo/bar/' test.txt
+.Ed
+.Pp
.Sh SEE ALSO
.Xr awk 1 ,
.Xr ed 1 ,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Aug 7, 12:43 AM (16 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36139976
Default Alt Text
D9958.id26143.diff (785 B)
Attached To
Mode
D9958: Add some examples to sed(1)
Attached
Detach File
Event Timeline
Log In to Comment