1.7.1-1: sh.exe dos-style problem

pdcy@gmx.com pdcy@gmx.com
Mon Feb 15 16:14:00 GMT 2010


Hallo all,
Is it possible to make sh.exe process dos-style files (line break: 0x0D 0x0A) correctly? Converting the script file to unix style is not possible in my special case.

Please find a detailed description below.

Thanks in advance
Peter

1. IBM Rational ClearQuest Client für Windows 7.1.0 is installed on the Windows XP system.
Drive Q: is connected to ClearCase dynamic view \\view\N4_DV_Z002PEYV.
Drive C: is system drive.

2. Create dos-style shell script c:\shTest\shTest.sh with contents
"ls > a.txt<cr><lf>" (In Hex 6C 73 20 3E 20 61 2E 74 78 74 0D 0A).

3.1 Command line
C:\shTest>sh c:\shTest\shTest.sh
   -> a.txt? is created (a.txt without ? was expected)

3.2 Switch to Q and run command again:
C:\shTest>q:
Q:\MedMake>
Q:\MedMake>sh c:\shTest\shTest.sh
 -> Now it is reported: ": No such file or directory: a.txt"
 
4. Change the shell script shTest.sh to unix-style (line break 0x0A)
 -> Now a.txt is successfully created both under C: and Q:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygcheck.out
Type: application/octet-stream
Size: 15024 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20100215/37518bc9/attachment.obj>
-------------- next part --------------
--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


More information about the Cygwin mailing list