It's windows os, with cygwin bash, might be a problem there ?
Whilst I'm all in favour of using Cygwin you have to take into consideration the differences between Unix and Windows. The two biggies are
[ol]
[li]path seperators. Unix uses the forward slash, windows the backslash. This may seem trivial except that Unix, along with its cousin the 'C' programming language, uses the backslash to change the meaning of certain characters. \t, for example is the tab character[/li]
[li]Line terminators in text files. Unix uses Line Feed (0x0A) and Windows uses a combination of Carriage Return and Line Feed (0x0D and 0x0A). This means that a text document prepared on Windows will have Ctrl-M at the end of each line when viewed under Unix and a text document created under Unix may not look right (it depends on what's used for viewing) when viewed under Windows.[/li]
[/ol]
When putting Windows type paths into Cygwin shell scripts the answer is to 'escape' the backslashes. There are two ways to do this.
[ol][li]Quote all relevant strings in single quotes. i.e. 'C:\windows\path' - the single quote implies that ALL characters are to be interpreted as typed - i.e. no variable expansion etc.[/li]
[li]escape the backslash by using the escape character, the backslash - i.e. C:\\windows\\path[/li][/ol]
In the script that were discussing the backslashes need to be converted to forward slashes on input to prevent the shell misinterpreting them. Once the processing has been completed we can change them back again.
Ceci n'est pas une signature
Columb Healy