diff options
-rwxr-xr-x | check.sh | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -62,8 +62,8 @@ fi # summary totals=$(wc -l *.txt | sed 's|\(.*\)|\t\1|') -n_unsourced=$(wc -l <<<${unsourced}) -n_malformed=$(wc -l <<<${invalid} ) +n_unsourced=$( [[ "${unsourced}" ]] && wc -l <<<${unsourced} || echo 0 ) +n_malformed=$( [[ "${invalid}" ]] && wc -l <<<${invalid} || echo 0 ) echo -e "summary:\n\t* number of entries total:\n${totals}" (( ${n_malformed} )) && echo -e "\t* number of entries improperly formatted: ${n_malformed}" (( ${n_unsourced} )) && echo -e "\t* number of entries needing citation: ${n_unsourced}" |