aboutsummaryrefslogtreecommitdiff
path: root/gromo
diff options
context:
space:
mode:
authorGuillermo Ramos2022-01-20 10:40:10 +0100
committerGuillermo Ramos2022-01-20 10:40:10 +0100
commita825bb90dd4548008c0aeeacea868f35c7f1c21f (patch)
tree6ce67fad7c907a9f94a39924669d01ee0a9c51cd /gromo
parenta078f36dd0201cd46b124ba352e2c6d64a414b9c (diff)
downloadcli-a825bb90dd4548008c0aeeacea868f35c7f1c21f.tar.gz
Small fixes
Diffstat (limited to 'gromo')
-rwxr-xr-xgromo9
1 files changed, 6 insertions, 3 deletions
diff --git a/gromo b/gromo
index d85030b..e083e60 100755
--- a/gromo
+++ b/gromo
@@ -109,9 +109,12 @@ EOF
out+="\n"
done
- while IFS=$FS read -r task dur gromos; do
- echo -e "$task\n\t$gromos gromos, $(pp_seconds $dur)"
- done <<<$(echo -e "$out" | sort -t $FS -k 2 -rn)
+ sortedout=$(printf "$out" | sort -t $FS -k 2 -rn)
+ if [ -n "$sortedout" ]; then
+ while IFS=$FS read -r task dur gromos; do
+ echo -e "$task\n\t$gromos gromos, $(pp_seconds $dur)"
+ done <<<$sortedout
+ fi
fi
fi
}