From owner-svn-src-head@freebsd.org Mon Apr 24 16:52:28 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63BB9D4E0F1; Mon, 24 Apr 2017 16:52:28 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 30B4A9AB; Mon, 24 Apr 2017 16:52:28 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3OGqRUb071500; Mon, 24 Apr 2017 16:52:27 GMT (envelope-from bcr@FreeBSD.org) Received: (from bcr@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3OGqRrR071499; Mon, 24 Apr 2017 16:52:27 GMT (envelope-from bcr@FreeBSD.org) Message-Id: <201704241652.v3OGqRrR071499@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bcr set sender to bcr@FreeBSD.org using -f From: Benedict Reuschling Date: Mon, 24 Apr 2017 16:52:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317378 - head/usr.bin/sed X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Apr 2017 16:52:28 -0000 Author: bcr (doc committer) Date: Mon Apr 24 16:52:26 2017 New Revision: 317378 URL: https://svnweb.freebsd.org/changeset/base/317378 Log: 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 Modified: head/usr.bin/sed/sed.1 Modified: head/usr.bin/sed/sed.1 ============================================================================== --- head/usr.bin/sed/sed.1 Mon Apr 24 16:49:30 2017 (r317377) +++ head/usr.bin/sed/sed.1 Mon Apr 24 16:52:26 2017 (r317378) @@ -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 ,