Date: Sat, 25 Jan 2014 23:10:10 +0100 From: Polytropon <freebsd@edvax.de> To: Shayan Pooya <shayan@liveve.org> Cc: freebsd-questions@freebsd.org Subject: Re: Field delimiter in sort program in freebsd Message-ID: <20140125231010.b630559b.freebsd@edvax.de> In-Reply-To: <CABAubThPph9My=EhcxCbZVQRf%2Brya8yBmSsARxMSGLXN44aSMQ@mail.gmail.com> References: <CABAubTg2RH95LypshV6ZpZP1qQW24TQZfFSSrYs5DzUoqA5tSw@mail.gmail.com> <52E3C691.8090000@bananmonarki.se> <CABAubThPph9My=EhcxCbZVQRf%2Brya8yBmSsARxMSGLXN44aSMQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 25 Jan 2014 09:51:39 -0500, Shayan Pooya wrote: > Thanks. That explains the error message. What is the correct way of doing > it in tcsh though? I know it's probably one of the most overcomplicated and stupid approaches, but it seems to work: % sort -t `awk 'BEGIN { printf("%c", 0); }'` <in-data> Please note that I've not tested this. The null byte has a special meaning, it's interpreted as "end of string" in C-style strings ("null terminated strings"), so having to use it as a field delimiter looks a bit strange. Maybe you could use a search and replace step _prior_ to sorting to get this resolved? Just a suggestion... -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140125231010.b630559b.freebsd>