Re: [ilugd] Removing ^M from text files in vi
What can be the possible reason for this how can i stop this from happening how to get back my code without ^M? In vim do :%s/^M//g ^M is not literal, use CTRL-g CTRL-m to get ^M. regards, Nishant Hi, Use the dos2unix utility. (Unix Text File Format Converter). '^M's can be usually seen when you created a file on Ms Windows but read it on Linux (vi editor etc). ~ Jagmeet ~ ___ ilugd mailinglist -- ilugd@lists.linux-delhi.org http://frodo.hserus.net/mailman/listinfo/ilugd Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi http://www.mail-archive.com/ilugd@lists.linux-delhi.org/
Re: [ilugd] Removing ^M from text files in vi
What can be the possible reason for this how can i stop this from happening how to get back my code without ^M? In vim do :%s/^M//g ^M is not literal, use CTRL-g CTRL-m to get ^M. regards, Nishant -- Peace, Love and Compile the kernel. http://www.nishants.net Send instant messages to your online friends http://in.messenger.yahoo.com ___ ilugd mailinglist -- ilugd@lists.linux-delhi.org http://frodo.hserus.net/mailman/listinfo/ilugd Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi http://www.mail-archive.com/ilugd@lists.linux-delhi.org/
Re: [ilugd] Removing ^M from text files in vi
^M is not literal, use CTRL-g CTRL-m to get ^M. Sorry for the typo, CTRL-v CTRL-m will give ^M. regards, Nishant -- Peace, Love and Compile the kernel. http://www.nishants.net Send instant messages to your online friends http://in.messenger.yahoo.com ___ ilugd mailinglist -- ilugd@lists.linux-delhi.org http://frodo.hserus.net/mailman/listinfo/ilugd Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi http://www.mail-archive.com/ilugd@lists.linux-delhi.org/
Re: [ilugd] Removing ^M from text files in vi
Hi, bit late in replying...but hope this might as well help. We do it this way... use the command from the top level to remove the ctrl char - find . -name *.[c,h] -exec perl -pi -e 's/\cM//g' {} \; Square Bracket contains [Type of files] so modify it as per your need. regards Arshad On 12/12/05, Mayank Jain [EMAIL PROTECTED] wrote: Hi, I used Anjuta on Ubuntu 5.10 to write my code, committed it to the CVS at Novell Forge. But when i try to download the code-tarball from the CVS, i'm getting strange ^M characters at the end of every line in all files. Though i can remove them by deleting them one-by-ne, but this is getting very annoying. What can be the possible reason for this how can i stop this from happening how to get back my code without ^M? -- regards, makuchaku --- http://makuchaku.info When you speak out with the courage of your convictions, people listen! -- Valmik Thapar, Wildlife Conservationist. ___ ilugd mailinglist -- ilugd@lists.linux-delhi.org http://frodo.hserus.net/mailman/listinfo/ilugd Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi http://www.mail-archive.com/ilugd@lists.linux-delhi.org/ ___ ilugd mailinglist -- ilugd@lists.linux-delhi.org http://frodo.hserus.net/mailman/listinfo/ilugd Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi http://www.mail-archive.com/ilugd@lists.linux-delhi.org/
Re: [ilugd] Removing ^M from text files in vi
On Monday 12 Dec 2005 4:32 pm, Mayank Jain wrote: What can be the possible reason for this how can i stop this from happening how to get back my code without ^M? dos text format - use dos2unix utility to clean it up -- regards kg http://www.livejournal.com/users/lawgon tally ho! http://avsap.org.in ಇಂಡ್ಲಿನಕ್ಸ வாழ்க! ___ ilugd mailinglist -- ilugd@lists.linux-delhi.org http://frodo.hserus.net/mailman/listinfo/ilugd Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi http://www.mail-archive.com/ilugd@lists.linux-delhi.org/
Re: [ilugd] Removing ^M from text files in vi
On 12/12/05, Mayank Jain [EMAIL PROTECTED] wrote: I used Anjuta on Ubuntu 5.10 to write my code, committed it to the CVS at Novell Forge. But when i try to download the code-tarball from the CVS, i'm getting strange ^M characters at the end of every line in all files. I understand that this should be normal behaviour if i'm moving the file between win32 Linux. But i'm not... still the ^M character.. PS: dos2unix does solves this, but why in the first place is ^M coming? -- regards, makuchaku --- http://makuchaku.info When you speak out with the courage of your convictions, people listen! -- Valmik Thapar, Wildlife Conservationist. ___ ilugd mailinglist -- ilugd@lists.linux-delhi.org http://frodo.hserus.net/mailman/listinfo/ilugd Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi http://www.mail-archive.com/ilugd@lists.linux-delhi.org/
Re: [ilugd] Removing ^M from text files in vi
On Monday 12 Dec 2005 4:42 pm, Mayank Jain wrote: PS: dos2unix does solves this, but why in the first place is ^M coming? maybe novellforge runs on doze? -- regards kg http://www.livejournal.com/users/lawgon tally ho! http://avsap.org.in ಇಂಡ್ಲಿನಕ್ಸ வாழ்க! ___ ilugd mailinglist -- ilugd@lists.linux-delhi.org http://frodo.hserus.net/mailman/listinfo/ilugd Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi http://www.mail-archive.com/ilugd@lists.linux-delhi.org/
Re: [ilugd] Removing ^M from text files in vi
On 12/12/05, Kenneth Gonsalves [EMAIL PROTECTED] wrote: On Monday 12 Dec 2005 4:42 pm, Mayank Jain wrote: PS: dos2unix does solves this, but why in the first place is ^M coming? maybe novellforge runs on doze? I dont think so... :-P -- regards, makuchaku --- http://makuchaku.info When you speak out with the courage of your convictions, people listen! -- Valmik Thapar, Wildlife Conservationist. ___ ilugd mailinglist -- ilugd@lists.linux-delhi.org http://frodo.hserus.net/mailman/listinfo/ilugd Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi http://www.mail-archive.com/ilugd@lists.linux-delhi.org/
Re: [ilugd] Removing ^M from text files in vi
On Monday 12 Dec 2005 5:43 pm, Mayank Jain wrote: On 12/12/05, Kenneth Gonsalves [EMAIL PROTECTED] wrote: On Monday 12 Dec 2005 4:42 pm, Mayank Jain wrote: PS: dos2unix does solves this, but why in the first place is ^M coming? maybe novellforge runs on doze? I dont think so... :-P is the tarball made automatically or manually? if manually maybe it is done by someone on a windoze machine? afaik the only way these ^M s can come is if the files are saved as dos text. -- regards kg http://www.livejournal.com/users/lawgon tally ho! http://avsap.org.in ಇಂಡ್ಲಿನಕ್ಸ வாழ்க! ___ ilugd mailinglist -- ilugd@lists.linux-delhi.org http://frodo.hserus.net/mailman/listinfo/ilugd Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi http://www.mail-archive.com/ilugd@lists.linux-delhi.org/
Re: [ilugd] Removing ^M from text files in vi
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Kenneth Gonsalves wrote: is the tarball made automatically or manually? if manually maybe it is done by someone on a windoze machine? afaik the only way these ^M s can come is if the files are saved as dos text. It might be so that the script that autoconfigures the tarball does so processing the file on a Netware machine - a DOS format file is a probability. On a Linux box also, there might be a script error during the automagical conversion. Rgds SM -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.6 (GNU/Linux) Comment: Using GnuPG with Red Hat - http://enigmail.mozdev.org iD8DBQFDnW0N+g4kmZ76nyERAoeNAJ4wQYFKpiBWRXqloeV8YiuIlRmS7wCfZVcD vG2WsRPwPARSvXpavT2Sib4= =kSAn -END PGP SIGNATURE- ___ ilugd mailinglist -- ilugd@lists.linux-delhi.org http://frodo.hserus.net/mailman/listinfo/ilugd Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi http://www.mail-archive.com/ilugd@lists.linux-delhi.org/
Re: [ilugd] Removing ^M from text files in vi
Mayank Jain wrote: What can be the possible reason for this how can i stop this from happening how to get back my code without ^M? do a global substitute on you file. use :%s/(press ctrl+v+m)//g this will do the job regards sanjay ___ ilugd mailinglist -- ilugd@lists.linux-delhi.org http://frodo.hserus.net/mailman/listinfo/ilugd Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi http://www.mail-archive.com/ilugd@lists.linux-delhi.org/
Re: [ilugd] Removing ^M from text files in vi
On 12/12/05, Kenneth Gonsalves [EMAIL PROTECTED] wrote: is the tarball made automatically or manually? if manually maybe it is done by someone on a windoze machine? afaik the only way these ^M s can come is if the files are saved as dos text. Not manually... Sakarshan, your answer can be a probablility. But what I dont understand is why this was never filed as a bug with them, or why no one pointed this to the Novell Forge guys? Almost all of the projects hosted there relate to Linux somehow many of the developers ought to be using linux... Anyways, i'll be filing this as a bug with the Novell forge guys. dos2unix seems to do the work fo me. Sanjay, thanks for the solution :-) -- regards, makuchaku --- http://makuchaku.info When you speak out with the courage of your convictions, people listen! -- Valmik Thapar, Wildlife Conservationist. ___ ilugd mailinglist -- ilugd@lists.linux-delhi.org http://frodo.hserus.net/mailman/listinfo/ilugd Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi http://www.mail-archive.com/ilugd@lists.linux-delhi.org/
Re: [ilugd] Removing ^M from text files in vi
On Monday 12 Dec 2005 9:19 pm, Mayank Jain wrote: Anyways, i'll be filing this as a bug with the Novell forge guys. dos2unix seems to do the work fo me. Sanjay, thanks for the solution :-) why dont you host on a linux friendly platform? -- regards kg http://www.livejournal.com/users/lawgon tally ho! http://avsap.org.in ಇಂಡ್ಲಿನಕ್ಸ வாழ்க! ___ ilugd mailinglist -- ilugd@lists.linux-delhi.org http://frodo.hserus.net/mailman/listinfo/ilugd Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi http://www.mail-archive.com/ilugd@lists.linux-delhi.org/
Re: [ilugd] Removing ^M from text files in vi
On 12/12/05, Kenneth Gonsalves [EMAIL PROTECTED] wrote: On Monday 12 Dec 2005 9:19 pm, Mayank Jain wrote: Anyways, i'll be filing this as a bug with the Novell forge guys. dos2unix seems to do the work fo me. Sanjay, thanks for the solution :-) why dont you host on a linux friendly platform? The platform seems to be enough linux friendly. This might be a bug. Let the Novell guys respond we'll see :-) -- regards, makuchaku --- http://makuchaku.info When you speak out with the courage of your convictions, people listen! -- Valmik Thapar, Wildlife Conservationist. ___ ilugd mailinglist -- ilugd@lists.linux-delhi.org http://frodo.hserus.net/mailman/listinfo/ilugd Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi http://www.mail-archive.com/ilugd@lists.linux-delhi.org/