I'm using Windows and writing shell scripts to run on Babun (a POSIX api).
I need to read a path from an environment variable, $USERPROFILE, and convert it to unix style (replace \ by /, c:\ by /c/) so I can use it later in the script.
The problem is whenever I echo the content of $USERPROFILE, the backslashes are interpreted as escaping characters and I get an unexpected result (letters "randomly" turn into special characters like \n, \f, etc). So I can't echo it into sed for example.