pt-stalk erroneously deleted files with empty first line

This commit is contained in:
Frank Cizmich
2015-03-27 15:54:11 -03:00
parent 16a7ffa6f9
commit 41c4080522

View File

@@ -1000,7 +1000,7 @@ collect() {
wait_for_subshells $OPT_RUN_TIME
kill_all_subshells
for file in "$d/$p-"*; do
if [ -z "$(grep -v '^TS ' --max-count 1 "$file")" ]; then
if [ -z "$(grep -v '^TS ' --max-count 10 "$file")" ]; then
log "Removing empty file $file";
rm "$file"
fi