I am writing a bash script to mount DFS Windows shares via
cifs. I have the main part working, but I am having trouble for when I need the user to enter the DFS path as a variable and convert the backslashes to forward slashes.
#!/bin/bash FILE='\\edi3\welshch\test' FILEPATH="$("$FILE" | sed -e 's/\\/\//gp')" echo $FILEPATH
I had another script that used a command to find a filepath for AD home directories then piped to sed as per the part
| sed -e 's/\\/\//gp
However this script above gives me;
./test.sh: line 10: \\edi3\welshch\test: command not found