Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Feb 1999 06:06:44 +1000
From:      Greg Black <gjb@comkey.com.au>
To:        Sue Blake <sue@welearn.com.au>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: cleaning a text file 
Message-ID:  <19990216200644.2287.qmail@alpha.comkey.com.au>
In-Reply-To: <19990215195935.12817@welearn.com.au>  of Mon, 15 Feb 1999 19:59:35 %2B1100
References:  <19990215195935.12817@welearn.com.au> 

next in thread | previous in thread | raw e-mail | index | archive | help
> I have a large text file, supposed to be platform-independent, which
> has had several characters replaced with characters that only make
> sense to Microsoft. I've been fixing them with a text editor, but can't
> tell if the file is completely OK yet. I don't know what might have
> been done to this file that I haven't noticed yet.

This is an incomplete specification of what you want done, and
it has produced some pretty funny answers so far.

> Is there some simple unix way to either
> check that all funny characters have been removed,
> or better,
> to get a list of the characters that might still need replacing?

The standard Unix utility for this job (and many other jobs) is
tr, and the man page gives an example that is so close to what I
think you want that the solution should be obvious.

Try it.  If it doesn't work for you, let us know exactly what
you need to do and somebody will provide the correct incantation
for tr or, if need be, write the few lines of C to do it.

-- 
Greg Black <gjb@acm.org>



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990216200644.2287.qmail>