Unified diffs in periodic/security email
Giorgos Keramidas
keramida at freebsd.org
Mon Sep 20 07:05:50 PDT 2004
I've been running my systems at home and work with the following diff
for some time. I tend to prefer the unified diff output format than the
default diff -b output.
Does anyone else like this? Any ideas for making the diff format
configurable in periodic.conf (i.e. to making it easy to switch between
diff -u and diff -c output)?
% Index: security.functions
% ===================================================================
% RCS file: /home/ncvs/src/etc/periodic/security/security.functions,v
% retrieving revision 1.3
% diff -u -r1.3 security.functions
% --- security.functions 30 Jun 2003 22:06:26 -0000 1.3
% +++ security.functions 7 Sep 2004 07:50:35 -0000
% @@ -67,7 +67,7 @@
% [ $rc -lt 1 ] && rc=1
% echo ""
% echo "${msg}"
% - diff -b ${LOG}/${label}.today ${tmpf} | eval "${filter}"
% + diff -u -b ${LOG}/${label}.today ${tmpf} | eval "${filter}"
% mv ${LOG}/${label}.today ${LOG}/${label}.yesterday || rc=3
% mv ${tmpf} ${LOG}/${label}.today || rc=3
% fi
More information about the freebsd-hackers
mailing list