I'm new to shell scripting and trying to accomplish following, converting a windows path to a linux path and navigating to that location:
Input: cdwin "J:\abc\def"
Action: cd /usr/abc/def/
So, I'm changing the following:
"J:" -> "/usr"
and
"\" -> "/"
This is my try, but it doesn't work. It just returns a blank if i echo it:
function cdwin(){
line="/usrfem/Projects$1/" | sed 's/\\/\//g' | sed 's/J://'
cd $line
}