]> git.alrj.org Git - brioche.git/blobdiff - dow
* Add the "dow" script, update documentation.
[brioche.git] / dow
diff --git a/dow b/dow
new file mode 100644 (file)
index 0000000..fa57508
--- /dev/null
+++ b/dow
@@ -0,0 +1,16 @@
+#! /bin/bash
+
+# This script simply prints the abbreviated weekday name, using the C locale
+# and without line feed.
+#
+# Written by Amand Tihon <amand.tihon@alrj.org> for the Brioche backup script.
+# This script is Public Domain.
+#
+# A possible use is to generate daily logfiles names, like with
+# ... > /var/log/something.`dow`.log
+#
+# Note that if you intend to use it like this from your crontab, it should be
+# placed in a directory present in the limited PATH set by cron, like /usr/bin.
+
+export LC_ALL=C
+echo -n `date "+%a"`