Path: utzoo!utgpu!water!watmath!clyde!bellcore!rutgers!ucsd!sdcc6!loral!jlh From: jlh@loral.UUCP (The Mad Merkin Hunter) Newsgroups: comp.sys.ibm.pc Subject: Re: CR? LF? CRLF???? Message-ID: <1775@loral.UUCP> Date: 3 Jun 88 20:22:05 GMT References: <1770@loral.UUCP> <17210@gatech.edu> Reply-To: jlh@loral.UUCP (The Mad Merkin Hunter) Organization: Under the table Lines: 35 In article <17210@gatech.edu> jkg@gatech.UUCP (Jim Greenlee) writes: =In article <1770@loral.UUCP= jlh@loral.UUCP (The Mad Merkin Hunter) writes: ==Edlin rides the porcelan bus unless it ==sees a CR LF combination. So, is there an easy way in DOS or MKS vi ==to automatically do this conversion? = =The easiest way to do this is with MKS vi. Just vi the file and do a =":wq!". MKS vi automatically converts LF characters to CR/LF pairs =when it writes the file to disk. = =Disclaimer: this works with the 2.2b version of vi. MKS vi version 2.2 doesn't do this conversion. I prefer this method, what I want from an editor is for it to write my file AS IS to the disk unless I explicitly tell it the changes to make. Of course, it would be nice if I could tell it to make this conversion..... I found another oddity with this editor. There is a :source command that allows you to read commands from a file. So I made up a file with 8 search and replace commands in it, figuring that vi'ing and :source'ing 5 files beats doing things manually. Hey, guess what? As soon as a search string is not found it aborts execution of the source'd file! Unfortunatly, not all conversions need be done to all files. At this point I uploaded things back to the vax, made my changes with sed, stuck a bloody CR at the end of each line, and re-downloaded the mess. God I love DOS. Jim "I'll never quit drinking. Everybody hates a quitter." -- Jim Harkins Loral Instrumentation, San Diego {ucbvax, ittvax!dcdwest, akgua, decvax, ihnp4}!ucsd!sdcc6!loral!jlh