The format of ASCII files under DOS and UNIX are different. Under UNIX, the end of a line is represented by a linefeed character and the end of a file is represented by the character ^D (new line). However, in DOS, the end of a line is represented by a carriage return followed by a linefeed character, and the end of a file is represented by the character ^Z. There are several ways to convert UNIX formatted files to DOS and vice versa. This document applies to AIX Versions 3.2, 4.1, 4.2, and 4.3.
The product documentation library is also available:
http://www.rs6000.ibm.com/resource/aix_resource/Pubs/index.html
doswrite -a [filename] UNIX -> DOS dosread -a [filename] DOS -> UNIXNOTE: The fileset bos.dosutil must be installed to use dosread or doswrite.
sed 's/$/^M/' [filename] > [newfilename] UNIX -> DOS sed 's/^M$/$/' [filename] > [newfilename] DOS -> UNIX
NOTE: ^M represents the control sequence for a carriage return.
:%s/$/^M/g UNIX -> DOS :%s/^M$//g DOS -> UNIX
[ Doc Ref: 90605194914796 Publish Date: Dec. 15, 2000 4FAX Ref: 9086 ]