Added BASH version detection where required.