It is currently Sat, 18 May 2013 22:10:38 GMT



 
Author Message
 The bane of my FreeBSD existance
What is up with ^M codes?  I am assuming that this an end of line delimiter
(like say an ascii(13) or so) but why does FreeBSD appear to have such a
difficult time ignoring them.  I have been running into Makefile's that are
loaded with them.  In order to get my FreeBSD box to install the app I must
remove every ^M code in the Makefile or the make will fail.  Is there a way
to get FreeBSD to just ignore these codes at the end of each line in a
script?


 Fri, 16 Sep 2005 03:16:23 GMT   
 The bane of my FreeBSD existance

Sounds like you are using a lot of text files from a Micro$oft world.  In
the non-Unix land lines are terminated with ^M^J and in Unix land lines are
terminated with ^J only.

To get rid of ^M's in your text files in the Unix land you can use the
tr program, i.e.:

tr -d "\r" < file.windows.txt > file.unix.txt

Good Luck

Later

Mark Hittinger
b...@pu.net



 Fri, 16 Sep 2005 03:28:16 GMT   
 The bane of my FreeBSD existance

i edit in vim so i just do

:%s/\r//g



 Sun, 18 Sep 2005 20:26:40 GMT   
 The bane of my FreeBSD existance

Those are Carriage Returns

you can also do something like this

tr -d '\r' < somefile > somefile.new; mv somefile.new somefile to remove
them if you don't want to pull the file up in vi.

You can also do a search for dos2unix which is a small program to do the
same thing.

Hope that helps,
-Patrick



 Thu, 22 Sep 2005 22:09:38 GMT   
 
   [ 4 post ] 

Similar Threads

1. The bane of my FreeBSD existance

2. CMD-640x chips - Bane of my existance.

3. APM, ACPI, and Wake on LAN - the bane of my existance

4. APM, ACPI, and Wake on LAN - the bane of my existance

5. FreeBSD Lockdown + Sudo: Boon or bane?

6. XDM- AKA bane of my life

7. RedHat 5.0, WIN95 and Co-existance

8. PAM account existance

9. check existance of an uid

10. File existance info


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software