Created
February 9, 2018 10:24
-
-
Save alexellis/4ce511f08313a16d5a945a5ad27b0f25 to your computer and use it in GitHub Desktop.
Sync time and date via curl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
date -d "$(curl -s --head http://google.com | grep ^Date: | sed 's/Date: //g')" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am using it on Centos 7. Your script is only show the date time but not set.