I have developed a script that transfers files from a UNIX machine to a Windows machine. Transferring the files is working perfectly, but my echo statements are displaying the destination (Windows) path names incorrectly.
I understand that it is the "\" that is causing this, but is there anyway to get echo to display the path without interpreting the "\" ?
Here is an example script that demonstrates the problem:
Thank you for the prompt response. I have been concentrating so much on the echo statement that I didn't think about altering the way the string is stored in the environment variable.
However, I guess I am going to have to rethink how I am doing things. If I alter the variable as suggested, then the echo works fine but the transfer command doesn't like it. (I am attempting to use the same variable to echo to the screen and pass to the transfer command)
It throws a communication error, but the log file for the IntrnTrans program states that "C:\\Reports\\tracelock.csv" is an invalid destination.
However, I have found another way that fixed the issue. I returned to setting the variables with double quotes, but when I echo the statement out I use "echo -E". My documentation states that "-E" disables interpretation of backslash escapes. The documentation also says that is the default, but it isn't behaving that way since I had to add it.