diff options
author | Guillermo Ramos | 2022-01-20 10:40:10 +0100 |
---|---|---|
committer | Guillermo Ramos | 2022-01-20 10:40:10 +0100 |
commit | a825bb90dd4548008c0aeeacea868f35c7f1c21f (patch) | |
tree | 6ce67fad7c907a9f94a39924669d01ee0a9c51cd /gromo | |
parent | a078f36dd0201cd46b124ba352e2c6d64a414b9c (diff) | |
download | cli-a825bb90dd4548008c0aeeacea868f35c7f1c21f.tar.gz |
Small fixes
Diffstat (limited to 'gromo')
-rwxr-xr-x | gromo | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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 } |