Switch to using bash arrays for confirmAndPerform commands. To the best of my knowledge this will provide both the most robust escaping and the best security.