summaryrefslogtreecommitdiffstats
path: root/httpdate
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2014-12-02 19:42:07 +0100
committerFlorian Pritz <bluewind@xinu.at>2014-12-02 19:42:07 +0100
commitf57e70617a8b4587f9bd92915f98bfc18d5619f9 (patch)
treec19ef3a68e77788ddebf4dd8f35d4a6c95a7693a /httpdate
parentdc08040a6f5ae47dd26b224167f4e5d225dcf6f6 (diff)
downloadbin-f57e70617a8b4587f9bd92915f98bfc18d5619f9.tar.gz
bin-f57e70617a8b4587f9bd92915f98bfc18d5619f9.tar.xz
add httpdate
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'httpdate')
-rwxr-xr-xhttpdate3
1 files changed, 3 insertions, 0 deletions
diff --git a/httpdate b/httpdate
new file mode 100755
index 0000000..437f345
--- /dev/null
+++ b/httpdate
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+date -s "$(curl -I google.com | sed -rn "s/^Date: (.*)$/\1/p")"