From owner-freebsd-questions@FreeBSD.ORG Sun Feb 19 09:09:09 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CD78216A420 for ; Sun, 19 Feb 2006 09:09:09 +0000 (GMT) (envelope-from jerik@jerik.de) Received: from mail.jerik.de (srv017.dedi32.de [83.151.25.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id D303843D55 for ; Sun, 19 Feb 2006 09:09:05 +0000 (GMT) (envelope-from jerik@jerik.de) Received: by mail.jerik.de (Postfix, from userid 1001) id 0BFD6613A; Sun, 19 Feb 2006 10:08:24 +0100 (CET) Date: Sun, 19 Feb 2006 10:08:24 +0100 From: "J. Erik Heinz" To: freebsd-questions@freebsd.org Message-ID: <20060219090822.GA85842@srv017.dedi32.de> Mail-Followup-To: freebsd-questions@freebsd.org References: <20060218161226.A611.GERARD@seibercom.net> <1140298493.8388.12.camel@localhost> <20060218165306.C5D2.GERARD@seibercom.net> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20060218165306.C5D2.GERARD@seibercom.net> User-Agent: Mutt/1.4.2.1i Subject: Re: Removing BOM from UTF-8 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Feb 2006 09:09:10 -0000 Hi, Gerard Seibert words on 18.02.2006 - 16:57 (-0500 Zulu-Time): > Benjamin A'Lee wrote: > > It shouldn't be writing any new files; it prints the filtered text to > > stdout. > > > > Ben > > OK, then that is the problem. I need it to actually write the file. It > could either rename the old file and then rewrite it which would be nice, > or just over write the old file. The BOM is just the first three > characters in the file. I am assuming that it would not be removing > anything else in the file. use a for-loop in your shell: # bash # cd to/your/directory # for i in *; do # nobom.sh $i > $i.new # done this will take all your files in your directory and proceed each one it with nobom.sh, which then will write it to new file. Be sure that your perlscript points to your perl installation on your system. You can use 'which perl' to get the location of your perl installation. Cheers Erik -- J. Erik Heinz Keyboard-samuraing in process :: All non-mailinglist mail to this emailadress will be deleted. OpenBC: https://www.openbc.com/hp/JErik_Heinz