stats.sh audit #3

Merged
Ghost merged 1 commit from audit-stats.sh into master 2018-11-29 17:25:13 +01:00

1 commit

Author SHA1 Message Date
Patrick Marchand 407c5aa57d Audited scripts/stats.sh
Shellcheck pass and code cleanup.

Set stricter error handling with sh options.

Removes the for loop and cat(1) in favor of directly calling the
file with cut(1) and piping the output to a while read loop. Read
https://github.com/koalaman/shellcheck/wiki/SC2002 for more info.

Adds proper variable globbing.

Removes the large block of commented code, if this turns out to be
necessary, we can add a condition check to the script instead of
uncommenting on a per case basis.
2018-11-14 14:52:01 -05:00