It will depend mostly on the environment, if bash
is executed in a msys or cygwin environment then there is a progam in PATH with the name cygpath
, in msys cygpath is a .bash file that depending on the version can be really very simple giving rise to errors (for example if the path does not exist), however ignoring the possible errors, the way to do it is as follows
$ cygpath C:\Users\usuario\Desktop\\install-new-cashier
/c/Users/usuario/Desktop/install-new-cashier
Inverse process, stored as variable:
$ variable=$(cygpath -w /c/Users/usuario/Desktop/install-new-cashier)
$ echo $variable
C:\Users\usuario\Desktop\install-new-cashier
You can be guided at this response , or consult the documentation of your bash provider directly