Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Jan 2014 15:13:37 +0100
From:      Bernt Hansson <bah@bananmonarki.se>
To:        Shayan Pooya <shayan@liveve.org>, freebsd-questions@freebsd.org
Subject:   Re: Field delimiter in sort program in freebsd
Message-ID:  <52E3C691.8090000@bananmonarki.se>
In-Reply-To: <CABAubTg2RH95LypshV6ZpZP1qQW24TQZfFSSrYs5DzUoqA5tSw@mail.gmail.com>
References:  <CABAubTg2RH95LypshV6ZpZP1qQW24TQZfFSSrYs5DzUoqA5tSw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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!



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