From f65b10457b2268edf2487ca40269779425e0b7b0 Mon Sep 17 00:00:00 2001 From: Titus von Boxberg Date: Wed, 3 Feb 2010 00:24:24 +0100 Subject: scripts/functions: fix date munging when ns are not available On some systems (eg. *BSD and Darwin), date does not support nanoseconds (%N) precision. Instead of printing '%N' in this case, it just prints 'N'. Fix the sed expression to handle this case. diff --git a/scripts/functions b/scripts/functions index 18915ee..87a6bdb 100644 --- a/scripts/functions +++ b/scripts/functions @@ -192,7 +192,7 @@ CT_Which() { # to the highest entire second # Usage: CT_DoDate CT_DoDate() { - date "$1" |sed -r -e 's/%N$/000000000/;' + date "$1" |sed -r -e 's/N$/000000000/;' } CT_STEP_COUNT=1 -- cgit v0.10.2-6-g49f6