mirror of
https://github.com/rwxrob/dot
synced 2024-11-14 18:12:56 +00:00
11 lines
319 B
Bash
Executable File
11 lines
319 B
Bash
Executable File
#!/usr/bin/env bash
|
|
seconds="$1"
|
|
[[ -z "$seconds" ]] && echo "usage: $0 SECONDS" && exit 1
|
|
days=$((seconds/86400))
|
|
(( seconds -= (days*86400) ))
|
|
hours=$((seconds/3600))
|
|
(( seconds -= (hours*3600) ))
|
|
minutes=$((seconds/60))
|
|
(( seconds -= (minutes*60) ))
|
|
printf "%i.%02i.%02i.%02i" "$days" "$hours" "$minutes" "$seconds"
|