aboutsummaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-12-07 23:49:30 +1300
committerTom Ryder <tom@sanctum.geek.nz>2016-12-07 23:49:30 +1300
commiteb48a2254b480764e1ab427f98a13262b3479002 (patch)
tree5586803ae0154e548dc284aae8b42e1b2d5961aa /man
parentPrevent getopts call in tree() panicking (diff)
downloaddotfiles-eb48a2254b480764e1ab427f98a13262b3479002.tar.gz
dotfiles-eb48a2254b480764e1ab427f98a13262b3479002.zip
Add sec(1df)
Might extend this later to do stuff like 1w3d2m0s
Diffstat (limited to 'man')
-rw-r--r--man/man1/sec.1df21
1 files changed, 21 insertions, 0 deletions
diff --git a/man/man1/sec.1df b/man/man1/sec.1df
new file mode 100644
index 00000000..589b6a74
--- /dev/null
+++ b/man/man1/sec.1df
@@ -0,0 +1,21 @@
+.TH SEC 1df "December 2016" "Manual page for sec"
+.SH NAME
+.B sec
+\- convert colon-delimited durations to seconds
+.SH USAGE
+.B sec
+FILE1 [FILE2 ...]
+.br
+.B sec
+< FILE
+.br
+printf '1:02:54\\n' |
+.br
+sec=$(printf '%s\n' "$timestamp" | sec)
+.B sec
+.SH DESCRIPTION
+Applies awk(1) to convert hh:mm:ss or mm:ss timestamps into a count of seconds.
+Exits zero if all lines were successfully recognised and converted, non-zero
+otherwise.
+.SH AUTHOR
+Tom Ryder <tom@sanctum.geek.nz>