Can anybody help me in finding out a solution for the problem below?
When we write .unix or .sh files in windows OS and port them to Unix platforms there is a character ^M inserted at the end of each line of the script file.
During ftp porting I set the transfer mode as ASCII for the script files where I ported files individually.Then there is no such problem.
But when we go for folder transfer where the folder has the script files dumped the problem comes again where the space is inserted with ^M at the end of lines...
We developed a product in windows and prepared installers both for windows and unix OS.The project files contains some unix scripts for the application to run on Unix OS.
So when we run the installer and install the product in Unix OS , the unix script files which get installed pertaining to the application have this ^M at the end of the lines.
So how to rectify the problem.
The solution you gave solves the problem in individual file porting.
But how about for the installer files and installer?
> We developed a product in windows and prepared installers
> both for windows and unix OS.The project files contains some
> unix scripts for the application to run on Unix OS.
> So when we run the installer and install the product in Unix
> OS , the unix script files which get installed pertaining to the
> application have this ^M at the end of the lines.
The obvious solution to the problem is to use an Editor that's capable of writing out Unix compatible files.
... if not, how are you porting the files from the windows platform to UNIX ? Some FTP clients will take care of this problem in the transfer - I think CuteFTP is one of them. www.cuteftp.com
Here's one that was shown to me; on the unix box, run this perl 1 liner from the command line - replace "dos.file" with the file to be converted from dos to unix:
During ftp porting I set the transfer mode as ASCII for the script files where I ported files individually.Then there is no such problem.
But when we go for folder transfer where the folder has the script files dumped the problem comes again where the space is inserted with ^M at the end of lines...