converting PC text files to UNIX WordPerfect

D Venkatrangan venkat at matrix.UUCP
Tue May 29 05:09:35 AEST 1990


In article <21463 at boulder.Colorado.EDU> baileyc at tramp.Colorado.EDU (BAILEY CHRISTOPHER R) writes:
>So, I need to know what to do in Word Perfect, or I need a wild card expander
>for DOS and UNIX (I process about 40 files each time we do this, so I cna't
>sit there and type DOS2UNIX dosfile > unixfile, etc.

In DOS, use the following:

for %f in (*.*) do dos2unix dos\%f unix\%f

If you want it in a batch file, use %%f for %f.

In UNIX (csh), use the following:

foreach i (*.*)
unix2dos unix/$i dos/$i
end

Inside vi, use the following key mappings (place these in .vi_init).

map #7 :%s/\([^^V^V^M]\)$/\1\^V^V^V^M/^M:%s/^$/\^V^V^V^M/^M
map #6 :%s/^V^V^M$//^M

The first one will convert a UNIX file into DOS file within vi.
The second one will convert DOS to UNIX. All except the first '^' in #7
(after [) is due to control-key combination.

---------------------------------------------------------------------------
D. Venkatrangan
Matrix Computer Systems, Inc.           7 1/2 Harris Rd, Nashua, NH 03062
suneast!venkat   uunet!matrix!venkat    (603) 888-7790
---------------------------------------------------------------------------



More information about the Comp.unix.questions mailing list