From owner-freebsd-questions@FreeBSD.ORG Wed May 21 07:36:06 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49607106566B for ; Wed, 21 May 2008 07:36:06 +0000 (UTC) (envelope-from karel@inetis.com) Received: from dsl.inetis.com (cpe-212-18-40-64.static.amis.net [212.18.40.64]) by mx1.freebsd.org (Postfix) with ESMTP id 670568FC20 for ; Wed, 21 May 2008 07:36:05 +0000 (UTC) (envelope-from karel@inetis.com) Received: from [192.168.110.14] ([192.168.110.14]) by inetis.com with MailEnable ESMTP; Wed, 21 May 2008 09:16:02 +0200 Message-ID: <4833CBAC.801@inetis.com> Date: Wed, 21 May 2008 09:13:48 +0200 From: Karel Miklav User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: FreeBSD Questions Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Sed, shell and hexadecimal character codes 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: Wed, 21 May 2008 07:36:06 -0000 There's a tip in the FreeBSD fortunes database that says: > Want to strip UTF-8 BOM(Bye Order Mark) from given files? > > sed -e '1s/^\xef\xbb\xbf//' < bomfile > newfile I can't make it work, and I can't find any other method to work with hexa codes in scripts or on the command line so I'm kind-a depressed :) I help myself with xxd now, but if it is possible to avoid it, I'd like to hear about it. -- Regards, Karel Miklav