| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
case "$1" in |
| 4 |
start) |
| 5 |
printf '\e[0Ksection_start:%s:%s\r\e[0K%s\n' "$(date +%s)" "$2" "$3" |
| 6 |
;; |
| 7 |
end) |
| 8 |
printf '\e[0Ksection_end:%s:%s\r\e[0K\n' "$(date +%s)" "$2" |
| 9 |
;; |
| 10 |
*) |
| 11 |
>&2 echo "usage: $0 start|end section_name [header_content]" |
| 12 |
;; |
| 13 |
esac |