From d5d5e0e607dc512ab10b19564cac65cb8404e9b7 Mon Sep 17 00:00:00 2001 From: marius Date: Mon, 1 Feb 2016 22:16:41 +0000 Subject: [PATCH] MFC: r295032 Use '^[>+][^+]' instead of '^[>+]' with grep(1) when filtering the diff(1) output between two files in "new_only"-mode. Otherwise, with the default of using unified format a remnant of the header in the output is the result. This is especially irritating when the two files differ but the second one is empty, amounting to the vestige of the header being the only readout. Reported by: Stefan Haemmerl Approved by: re (delphij) git-svn-id: svn://svn.freebsd.org/base/stable/10@295130 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- etc/periodic/security/security.functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/periodic/security/security.functions b/etc/periodic/security/security.functions index bc2bcba16..c2c757a37 100644 --- a/etc/periodic/security/security.functions +++ b/etc/periodic/security/security.functions @@ -51,7 +51,7 @@ check_diff() { rc=0 if [ "$1" = "new_only" ]; then shift - filter="grep '^[>+]'" + filter="grep '^[>+][^+]'" else filter="cat" fi -- 2.45.0