From owner-freebsd-questions@FreeBSD.ORG Sat Jan 25 14:13:41 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 24F8AE22 for ; Sat, 25 Jan 2014 14:13:41 +0000 (UTC) Received: from feeder.usenet4all.se (1-1-1-38a.far.sth.bostream.se [82.182.32.53]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9C8CB1516 for ; Sat, 25 Jan 2014 14:13:39 +0000 (UTC) Received: from kw.news4all.se (localhost [127.0.0.1]) by feeder.usenet4all.se (8.13.1/8.13.1) with ESMTP id s0PEDbtr038578; Sat, 25 Jan 2014 15:13:37 +0100 (CET) (envelope-from bah@bananmonarki.se) Message-ID: <52E3C691.8090000@bananmonarki.se> Date: Sat, 25 Jan 2014 15:13:37 +0100 From: Bernt Hansson User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Shayan Pooya , freebsd-questions@freebsd.org Subject: Re: Field delimiter in sort program in freebsd References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Jan 2014 14:13:41 -0000 On 2014-01-25 14:59, Shayan Pooya wrote: > Hello, > > How can I use the ascii character 0xff as the field delimiter for the > FreeBSD sort program? > On bash on Linux I use the following: > $ sort -t $'\xff' -z > to sort a set of null terminated lines where each field is separated by a > \xff. > > The FreeBSD 10 manual page says it has the -t option, but I am not sure how > I should give it the option to use a specific character. > > On tcsh: > % sort -t $'\xff' > Illegal variable name. $ is a variable, and you have not defined it. $ by it self means the first word on the line ie sort. So your line expands to: $ sort -t sort'\xff' NB I AM NOT A PROGRAMMER!