Created
March 16, 2018 20:20
-
-
Save mdpuma/5e58d42bc08ddab136dbb4e3ac89865d to your computer and use it in GitHub Desktop.
sleep_until.sh
This file contains hidden or 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 | |
| current_time=$(date +%s) | |
| target_time=$(date -d "$*" +%s) | |
| seconds=$(( $target_time - $current_time )) | |
| echo "sleeping $seconds (`date -d "$*"`)" | |
| sleep $seconds |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment