diff options
-rw-r--r-- | README.markdown | 1 | ||||
-rwxr-xr-x | bin/clog | 7 | ||||
-rw-r--r-- | man/man1/clog.1df | 15 |
3 files changed, 23 insertions, 0 deletions
diff --git a/README.markdown b/README.markdown index 5e576ab6..33205d9c 100644 --- a/README.markdown +++ b/README.markdown @@ -420,6 +420,7 @@ Installed by the `install-bin` target: * `cfr(1df)` does the same as `cf(1df)`, but recurses into subdirectories as well. * `chc(1df)` caches the output of a command. +* `clog(1df)` is a tiny timestamped log system. * `clrd(1df)` sets up a per-line file read, clearing the screen first. * `clwr(1df)` sets up a per-line file write, clearing the screen before each line diff --git a/bin/clog b/bin/clog new file mode 100755 index 00000000..d52ab4c5 --- /dev/null +++ b/bin/clog @@ -0,0 +1,7 @@ +#!/bin/sh +# Record a timestamped message to a logfile, defaulting to ~/.clog +{ + date + cat - + printf '%s\n' -- +} >>"${CLOG:-"$HOME"/.clog}" diff --git a/man/man1/clog.1df b/man/man1/clog.1df new file mode 100644 index 00000000..bb03765d --- /dev/null +++ b/man/man1/clog.1df @@ -0,0 +1,15 @@ +.TH CLOG 1df "December 2016" "Manual page for clog" +.SH NAME +.B clog +\- record timestamped logs in a file +.SH SYNOPSIS +.B clog +getting real tired of all this overengineering +^D +.SH DESCRIPTION +.B clog +receives a message on stdin, timestamps it with a leading date(1), and writes +it to the file with path in environment variable CLOG, defaulting to ~/.clog, +terminating each entry with two hyphens. +.SH AUTHOR +Tom Ryder <tom@sanctum.geek.nz> |