diff options
author | Hsieh Chin Fan <pham@topo.tw> | 2023-04-14 19:09:51 +0800 |
---|---|---|
committer | Hsieh Chin Fan <pham@topo.tw> | 2023-04-14 19:09:51 +0800 |
commit | eb61d8dcff14bd2975abeca85227dd65cce1c205 (patch) | |
tree | d4325343099bbb443021bd2455387e202594734d /bin/task/context | |
parent | 65c9b148415cb7c062eee654aade51c271e69c2c (diff) |
Update
Diffstat (limited to 'bin/task/context')
-rwxr-xr-x | bin/task/context | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/bin/task/context b/bin/task/context index 639f54a..c67b4de 100755 --- a/bin/task/context +++ b/bin/task/context | |||
@@ -40,6 +40,7 @@ _get_seconds() { | |||
40 | sec=$(grep -o '[0-9.]\+s' <<<"$1" | tr -d '[:alpha:]') | 40 | sec=$(grep -o '[0-9.]\+s' <<<"$1" | tr -d '[:alpha:]') |
41 | 41 | ||
42 | [ -z "$hour$min$sec" ] && kill -10 $PROC | 42 | [ -z "$hour$min$sec" ] && kill -10 $PROC |
43 | [[ "$time" =~ ^- ]] && echo -n - | ||
43 | echo "${hour:-0}*3600 + ${min:-0}*60 + ${sec:-0}" | bc | xargs printf '%.0f\n' | 44 | echo "${hour:-0}*3600 + ${min:-0}*60 + ${sec:-0}" | bc | xargs printf '%.0f\n' |
44 | } | 45 | } |
45 | 46 | ||