Before you transfer the files, you must have to do is run the following
command:
dos2unix -ascii filename filename
this will remove the ^M at the end of line.
On Thu, 31 Dec 1998, Ray Schafer wrote:
> "MENEZES, ALAIN" wrote:
>
> > Hi,
> >
> > When I copy a text file from NT to AIX I get a '^M' character at the end
> > of each line. Does anyone have a simple procedure that removes this last
> > character ?
>
> Alain,
>
> If you are using ftp, instead of using binary transfer mode, use ascii as it
> will take care of the translation. For a simple shell script that will do the
> job:
>
> sed 's/^M$//' file > file.temp && mv file.temp file
>
> The two characters above: "^" and "M" are supposed to be one character. If
> you
> are using the vi editor, you can type a control-M by first typing control-V
> then
> when you type control-M it will be represented as ^M. You can see that when
> you
> are done, because when you move the cursor across it, it will only see one of
> the two symbols in "^M".
>
>
> --
> Ray Schafer | schafer@tkg.com
> The Kernel Group | Network Computing Consulting
>
----------------------------
| Neil Nu~ez |
| email: nnunez@espol.edu.ec |
| E.S.P.O.L |
| Guayaquil-Ecuador |
----------------------------
|