This thread contains a variety of clever ways to trick the shell into executing the right program.. why not just patch the shell's source to be \r aware, and submit the patch to the maintainers? Solve the problem, instead of finding clever workarounds.