is_daytime - Exit status of true if it is currently daytime
is_daytime [-v] [-f FILE] is_daytime && echo 'It is Daytime!'
verbose
Specify alternate configuration file
Uses the system coordinates as configured from the perl package Geo::Local::Server and with the perl package DateTime::Event::Sunrise calculates the next sunset and sunrise to determine if it is currently daytime or nighttime
The exit status is 0 if it is daytime. The exit status is 1 if it is nighttime.
To install Geo::Local::Server, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Geo::Local::Server
CPAN shell
perl -MCPAN -e shell install Geo::Local::Server
For more information on module installation, please visit the detailed CPAN module installation guide.