From: Joe Buck (jbuck@forney.eecs.berkeley.edu)
Date: 06/11/93


From: jbuck@forney.eecs.berkeley.edu (Joe Buck)
Subject: Re: LF -> CRLF program?
Date: 11 Jun 1993 19:18:51 GMT

In article <9306111541.AA16402@uncledad.nwscc.sea06.navy.mil>
bone@uncledad.nwscc.sea06.navy.mil (Mike Bone) writes:
>Is there a program shipped in the SLS release to convert text files from
>LF to CRLF (i.e. unix to dos format)? I could not find such a program in
>the release. If anyone knows if there is one or where I can get one, I
>would greatly appreciate your help.

The following shell script is such a program. If no arguments are given,
it reads from the standard input; otherwise, the arguments are filenames.
It writes on the standard output. If it is named "crlf", then you can
say

crlf unix.txt > dos.txt

to convert unix.txt to dos.txt.

----cut here----
#! /bin/sh
awk '{printf("%s\r\n", $0)}' $*
----end of program-----