add edge case for converting from single to double brackets in bash