Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- MINUTES=${1:-30}
- future_datetime=$(date -v "+${MINUTES}M")
- future_time=$(date -j -f '%a %e %b %Y %H:%M:%S %Z' "${future_datetime}" '+%H:%M:%S')
- echo "Sleep set to ${future_time}"
- sudo /usr/bin/pmset repeat sleep MTWRFSU ${future_time}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement