79224285

Date: 2024-11-25 18:57:16
Score: 0.5
Natty:
Report link

You can pipe this to the end of your code to remove 0d, 0h, 0m, or 0s

sed 's, 0[a-z],,g'
$ printf '%dd %dh %dm %ds\n' $((secs/86400)) $((secs%86400/3600)) $((secs%3600/60)) $((secs%60))
1d 0h 27m 3s

$ printf ... | sed 's, 0[a-z],,g'
1d 27m 3s
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: nntrn