"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
|