aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Noll <nbnoll@eml.cc>2021-10-07 07:06:43 -0700
committerNicholas Noll <nbnoll@eml.cc>2021-10-08 16:00:45 -0700
commit61158de7bb2575cd594472584b7c2b90dd8da8a5 (patch)
tree8b9683d336f58b3812b576f94bab9936dc36de86
parentd9bc0f805e84115b940bed234bd182fca4c05b1f (diff)
fix(status): mail computation
-rwxr-xr-xbin/status2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/status b/bin/status
index 9a71d1a..2c0bf4c 100755
--- a/bin/status
+++ b/bin/status
@@ -7,7 +7,7 @@ cpu() {
}
mail() {
- NEWMAIL=$(ls -s ~/mail/*/INBOX/new | awk '{if ($1 == "total") { sum += $2} }; END {print sum}')
+ NEWMAIL=$(expr $(ls -1 ~/mail/*/INBOX/new | wc -l) - 7)
if [ "${NEWMAIL%% *}" -eq 0 ]; then
printf " (%s)" "${NEWMAIL%% *}"