From: Chris Koeritz Date: Sat, 18 Feb 2012 15:49:30 +0000 (-0500) Subject: new file for running a large report on a folder hierarchy using X-Git-Tag: 2.140.90~1596^2~1 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=11891e193cc10eb6765bea095e8766c9829ad44a;hp=12567e005ffe852e418c6f086cab95782367739e;p=feisty_meow.git new file for running a large report on a folder hierarchy using checker tool. --- diff --git a/scripts/files/checker_report.sh b/scripts/files/checker_report.sh new file mode 100755 index 00000000..ce0bb6bd --- /dev/null +++ b/scripts/files/checker_report.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +# checker_report: runs the checker utility against all files in a directory, +# in such a way that the file count can be very high without blowing its +# mind, and without any extra headers in the report. + +source $FEISTY_MEOW_SCRIPTS/core/functions.sh + +dirname="$1"; shift +outfile="$1"; shift # optional parm. + +if [ -z "$dirname" ]; then + echo "This script requires one directory on which to make a checker report." + exit 1 +fi + +if [ -z "$outfile" ]; then + outfile="$HOME/checker_report_$(hostname)_$(date_stringer).txt" +fi + +if [ -f "$outfile" ]; then + rm "$outfile" +fi + +temp_file_list="$(mktemp /tmp/file_list_temporary.XXXXXX)" + +find "$dirname" -type f >"$temp_file_list" +###-exec echo \"{}\" ';' +while read line; do + checker -q -b "$line" 2>&1 >>"$outfile" +done <"$temp_file_list" + +