From owner-freebsd-questions Tue Feb 16 12:20:51 1999 Delivered-To: freebsd-questions@freebsd.org Received: from alpha.comkey.com.au (alpha.comkey.com.au [203.9.152.215]) by hub.freebsd.org (Postfix) with SMTP id AB395117CA for ; Tue, 16 Feb 1999 12:20:37 -0800 (PST) (envelope-from gjb@comkey.com.au) Received: (qmail 2288 invoked by uid 1001); 16 Feb 1999 20:06:44 -0000 Message-ID: <19990216200644.2287.qmail@alpha.comkey.com.au> X-Posted-By: GBA-Post 1.04 06-Feb-1999 X-PGP-Fingerprint: 5A91 6942 8CEA 9DAB B95B C249 1CE1 493B 2B5A CE30 Date: Wed, 17 Feb 1999 06:06:44 +1000 From: Greg Black To: Sue Blake Cc: freebsd-questions@FreeBSD.ORG Subject: Re: cleaning a text file References: <19990215195935.12817@welearn.com.au> In-reply-to: <19990215195935.12817@welearn.com.au> of Mon, 15 Feb 1999 19:59:35 +1100 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > 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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message