I want to echo a Windows shared folder address to users in a Linux shell script, the address are strings like this: \\hostname\release\1.02A01. and the last string(1.02A01) is a version number, it's changed each time when I run the script. I tried something like this in sh (not bash ), but it doesn't work:
version=$1 # version number are get from the parameter
repository="\\\hostname\release\$version"
echo $repository # I get this: \hostname\dir$version
Here are the two errors:
- the double backslashes are not correct.
- the version is not parsed correctly.