Converting a File from DOS (Windows) to Unix. Even though many times our editors (such as vim or elvis which we may be running even though we type vi) do not show it, it is possible to have a file that has DOS style line feeds in it. The difference between a Unix file and a DOS file is the type of line feeds, DOS Places a CR LF (Carriage Return, Line Feed) at the end of each line, Unix/Linux only places a single CR at the end of each line. In many editors when you are viewing a DOS file you will see a ^M where the DOS CR is. In order to cut out this additional CR you have several options: 1) In our system, you likely have an alias that is already set up for you to do this. To see if you have the alias just type 'alias' at the command line. Doing this shows that I have 2 aliases that use 'recode' to recode the file to the correct character set. alias dos2unix='recode ibmpc..lat1' alias unix2dos='recode lat1..ibmpc' using one of these aliases will automatically recode the file for you. dos2unix [filename] will recode the file for you. 2) Use recode directly if you don't have the alias. man recode info recode Will show you how to do it. 3) The method I have used for years: Open the file in vi, at the last line prompt type: :1,$s/^v^m// and push enter. In vi the ctrl-v is an escape character, telling the vi interperter to accept the ctrl-m as a regular character and replace it with nothing. We do this by just holding down the control key and hitting v and then m when we are holding the control key. CSC128: Converting DOS to Unix Files