> I am struggling to get to grips with the EOL command.
> As standard I seem to output a file which when i read back in i see what
> appears to be double line spacing. If i open the file in vi i see ^M
> at the end of each line.
> How do i get rid of this to give me a regular file?
You are getting a regular file; it's just that vi reads in Unix format
(EOL = LF). So you need to set your EOL mode.
SC_EOL_CRLF, SC_EOL_CR, SC_EOL_LF.
Convert all line endings in the document to one mode.
Retrieve the current end of line mode - one of CRLF, CR, or LF.
Set the current end of line mode.
This might also solve your other problem; if not send a small amount of
code that reproduces the problem.