From e937f5025061b1275271316a3cd14460950f48b9 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Fri, 9 Dec 2016 12:41:23 +1300 Subject: Rephrase uts(1df) as pure Awk --- .gitignore | 1 + Makefile | 4 +++- bin/uts | 4 ---- bin/uts.awk | 6 ++++++ 4 files changed, 10 insertions(+), 5 deletions(-) delete mode 100755 bin/uts create mode 100644 bin/uts.awk diff --git a/.gitignore b/.gitignore index b0f351f0..0567e5a3 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ bin/slsf bin/su2d bin/tot bin/unf +bin/uts games/acq games/aesth games/drakon diff --git a/Makefile b/Makefile index ee70f91a..186348fa 100644 --- a/Makefile +++ b/Makefile @@ -82,6 +82,7 @@ all : bin/csmw \ bin/su2d \ bin/tot \ bin/unf \ + bin/uts \ git/gitconfig \ gnupg/gpg.conf @@ -103,6 +104,7 @@ clean distclean : bin/su2d \ bin/tot \ bin/unf \ + bin/uts \ games/acq \ games/aesth \ games/drakon \ @@ -191,7 +193,7 @@ install-bash-completion : install-bash install-bin : bin/csmw bin/ddup bin/gwp bin/han bin/mean bin/med bin/mftl \ bin/mode bin/rfct bin/rndi bin/sd2u bin/sec bin/slsf bin/su2d bin/tot \ - bin/unf install-bin-man + bin/unf bin/uts install-bin-man install -m 0755 -d -- "$(HOME)"/.local/bin for name in bin/* ; do \ [ -x "$$name" ] || continue ; \ diff --git a/bin/uts b/bin/uts deleted file mode 100755 index 8777a7e2..00000000 --- a/bin/uts +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -# Get the current timestamp in a POSIX compatible fashion -PATH=$(getconf PATH) -awk 'BEGIN { srand() ; print srand() }' diff --git a/bin/uts.awk b/bin/uts.awk new file mode 100644 index 00000000..3aaec2ab --- /dev/null +++ b/bin/uts.awk @@ -0,0 +1,6 @@ +# Print the current UNIX epoch timestamp in a POSIX compatible fashion +BEGIN { + srand() + print srand() + exit +} -- cgit v1.2.3