Reverted use of =~ breaks newer versions of BASH