?
Solved

CVS - Control-M character in source files import from Windows XP to Linux platform

Posted on 2005-03-07
2
Medium Priority
?
247 Views
Last Modified: 2013-12-16
Hi y'all,

Got a little problem. Basically I've got a quite a few web-based scripts (php, perl, html, javascript, etc..) that I've been just keeping in a source directory on my Windows XP box, but now I want to transfer them all to my Linux box and use CVS to keep control of them. I also want to use the $Revision$ and $Log$ tags in my source.

Problem is that when I transfer the files from XP to Linux (I actually just place them in a samba shared directory) then import them into cvs, I also get a Control-M (^M) character at the end of each line(I know this is effectively a carriage return.), although I get the $Revision$ and $Log$ correctly translated.

I can get around the Control-M characters by importing using the "-kb" option, however when I do this the $Revision$ and $Log$ tags aren't translated.

Anyone know a way I can have both? Or would I need to write some c/perl thang to sort this out?

Version info... CVS 1.11.17, Linux Fedora Core 3

Thank you,


Noel
0
Comment
Question by:Atlantisstorm
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 40

Accepted Solution

by:
jlevie earned 375 total points
ID: 13481149
After plaing the files on the Linux box use dos2unix to convert the windows line terminators (carriage-return/new-line) into just a new-line. Then do the import into CVS.
0
 

Author Comment

by:Atlantisstorm
ID: 13481467
Thank you jlevie, exactly what I was looking for (I'd forgotten dos2unix existed - been a loooong time:))
0

Featured Post

Percona Live Europe 2017 | Sep 25 - 27, 2017

The Percona Live Open Source Database Conference Europe 2017 is the premier event for the diverse and active European open source database community, as well as businesses that develop and use open source database software.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses
Course of the Month8 days, 22 hours left to enroll

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question