nv-l

Re: transfering scripts NT --> AIX

1998-12-31 14:23:55
Subject: Re: transfering scripts NT --> AIX
From: Ray Schafer <schafer AT TKG DOT COM>
To: nv-l AT lists.tivoli DOT com
Date: Thu, 31 Dec 1998 14:23:55 -0500
"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 AT tkg DOT com
The Kernel Group              | Network Computing Consulting

<Prev in Thread] Current Thread [Next in Thread>