Forked from ELLIOTTCABLE/gist:3a945b04ed8170d710ac
Last active
August 29, 2015 14:18
-
-
Save mateor/38bd90c459a5e7667e34 to your computer and use it in GitHub Desktop.
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
[ -n "${VAR##[NFnf]*}" ] && echo '$VAR must be truthy (but will be considered falsey by default, if empty)' | |
[ -z "${VAR##[YTyt]*}" ] && echo '$VAR must be truthy (and will be by default, if empty)' | |
[ -z "${VAR##[NFnf]*}" ] && echo '$VAR must be falsey (and will be by default, if empty)' | |
[ -n "${VAR##[YTyt]*}" ] && echo '$VAR must be falsey (but will be considered truthy by default, if empty)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment