From: Wayne Davison Date: Mon, 30 Jan 2006 08:11:50 +0000 (+0000) Subject: Moved the filter_outfile() function here since it was identical X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/commitdiff_plain/757287d8a58ee962933a77590117344076237587 Moved the filter_outfile() function here since it was identical in devices.test and itemize.test. --- diff --git a/testsuite/rsync.fns b/testsuite/rsync.fns index 5010f732..80c218dd 100644 --- a/testsuite/rsync.fns +++ b/testsuite/rsync.fns @@ -47,6 +47,20 @@ runtest() { fi } +# Call this if you want to filter out verbose messages (-v or -vv) from +# the output of an rsync run (whittling the output down to just the file +# messages). This isn't needed if you use -i without -v. +filter_outfile() { + sed -e '/^building file list /d' \ + -e '/^created directory /d' \ + -e '/^done$/d' \ + -e '/ --whole-file$/d' \ + -e '/^total: /d' \ + -e '/^$/,$d' \ + <"$outfile" >"$outfile.new" + mv "$outfile.new" "$outfile" +} + printmsg() { echo "$1" }