Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Jun 2021 13:37:10 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 253893] sed "/^\s*$/d" complains about trailing backslash (\)
Message-ID:  <bug-253893-227-FDF0wwdKuI@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-253893-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-253893-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D253893

--- Comment #12 from Ed Maste <emaste@freebsd.org> ---
(In reply to David Schlachter from comment #3)
> printf "\n\n\n\n" | sed "/^\s*$/d"

Note that this is not actually testing \s since we're matching 0 or more. F=
or
example, try (on 12.x or earlier):

$ printf "\n\n\n\n" | sed "/^x*$/d"

This also deletes the blank lines. Or, try:

$ printf " \n \n \n \n" | sed "/^\s*$/d"

and observe that the except-for-whitespace empty lines are not stripped.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-253893-227-FDF0wwdKuI>