Shell-Script: Test Whether The Current Time Is Within The Desired Time Window

A Simple Script That Checks If The Current Time Is Inside Or Outside Of The Given Hours

We recently needed a shell script to block activity during a given time window. I found a helpful stackexchange solution — but it needed a bit of tweaking to make it Bourne-shell friendly (and handle time windows) so I’m publishing my solution here in an attempt to make it more easily searchable.

--

--

Adam Fisher / fisher king (@therightstuff)

Software developer and writer of words, currently producing a graphic novel adaptation of Shakespeare's Sonnets! See http://therightstuff.bio.link for details.