Page MenuHomeFreeBSD

D9958.id26176.diff
No OneTemporary

D9958.id26176.diff

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,32 @@
.Xr environ 7 .
.Sh EXIT STATUS
.Ex -std
+.Sh EXAMPLES
+Replace
+.Ql bar
+with
+.Ql baz
+when piped from another command:
+.Bd -literal -offset indent
+echo "An alternate word, like bar, is sometimes used in examples." | sed 's/bar/baz/'
+.Ed
+.Pp
+Using a different separator can be handy when working with paths:
+.Bd -literal -offset indent
+echo "/dev/da1" | sed 's#da1#ada1#'
+.Ed
+.Pp
+Replace all occurances of
+.Ql foo
+with
+.QL bar
+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
+.Ed
+.Pp
.Sh SEE ALSO
.Xr awk 1 ,
.Xr ed 1 ,

File Metadata

Mime Type
text/plain
Expires
Wed, Sep 2, 3:07 AM (3 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37885725
Default Alt Text
D9958.id26176.diff (891 B)

Event Timeline