How can I compare a number against a range in Bash or Perl?
Perl is fairly straight forward, but I didn’t know that Bash supports this too. I think the implementation is pretty cool. Bash uses RegEx to allow users to test for a range. ❤
I wanted to use this for a Hazel Script to Sort Square Images, but I found the syntax to be too complicated. (The regular expression encloses two variables to compare against)