1var="/a/bc/def/file"
2echo "${var//\//\\/}"
3