Subject: Re: Help with Win -> NetBSD text files...
To: Eric Fox <eric@fox.phoenix.az.us>
From: Claude Marinier <claude.marinier@dreo.dnd.ca>
List: netbsd-help
Date: 03/20/2001 08:55:15
Eric,

On Mon, 19 Mar 2001, Eric Fox wrote:
> I end up working with a lot of HTML that originated on windoze
> machines.  In order to make life easier I usually process them with
> one of these short scripts to add/remove the CRLF insanity depending
> on where I'm moving the file.  Hope this helps some.

I have a few questions.

> CRLF=`/usr/bin/printf "\015"`
> cat $1 | sed "s/${CRLF}//g" >$TMP
> cat $TMP >$1

I thought that the LF was not visible to 'sed'. The name of the CRLF
variable implies that it contains two characters. The way you use it
implies that there will be no LF characters in the file after the 'sed'
command is done. Am I misreading the code?

What is the advantage of 'cat' and a pipe as opposed to just 'sed'
with an argument (first 'cat') or using 'cp' (second 'cat')?

Thanks.

By the way, I have use calvin and GVim on the Windows system. I have also
used PFE and recommend it for those who do not know vi.

-- 
Claude Marinier, Information Technology Group    claude.marinier@dreo.dnd.ca
Defence Research Establishment Ottawa (DREO)    (613) 998-4901  FAX 998-2675
3701 Carling Avenue, Ottawa, Ontario  K1A 0Z4         http://www.dreo.dnd.ca