ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/10/10/06:06:44

Date: Tue, 10 Oct 1995 10:57:40 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: "Nathan L. Cutler" <library AT ssd DOT anet DOT cz>
Cc: djgpp <djgpp AT sun DOT soe DOT clarkson DOT edu>
Subject: Re: Sed

On Sun, 8 Oct 1995, Nathan L. Cutler wrote:

> I installed Sed on my MS-DOS computer with the intention of using it to 
> convert Unix text files to DOS text files.  There seems to be a complete 
> lack of documentation.  I understand that I probably need to type 
> something like sed -e "some weird regexps here" infile > outfile but I 
> don't know the regexp for converting LF to CR/LF.

Incredible as it is, GNU Sed comes without any docs whatsoever, without 
even a man page.  You will have to get a man page from any Unix box, or 
read any of the books which describe its usage.

However, for what you need doing, you don't need Sed.  There is a small 
program called UTOD.EXE in your bin/ subdirectory of the DJGPP 
installation tree, which does exactly this.  You can run it this way:

	utod file1 [file2 ....]

(more than one file may be given on the command line), or even this way:

	utod *.*

and it will rewrite your files in the DOS text format.

Note that many programs, especially those written in C, usually don't 
care whether your files' lines end with LF or CR/LF, so it just might be 
that you don't even have to bother.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019