From owner-freebsd-questions@FreeBSD.ORG Sat Jan 25 22:10:36 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E611AFE8 for ; Sat, 25 Jan 2014 22:10:36 +0000 (UTC) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A66F01CCF for ; Sat, 25 Jan 2014 22:10:36 +0000 (UTC) Received: from r56.edvax.de (port-92-195-149-155.dynamic.qsc.de [92.195.149.155]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx02.qsc.de (Postfix) with ESMTPS id 1C7C324F94; Sat, 25 Jan 2014 23:10:35 +0100 (CET) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id s0PMAAku002142; Sat, 25 Jan 2014 23:10:10 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Sat, 25 Jan 2014 23:10:10 +0100 From: Polytropon To: Shayan Pooya Subject: Re: Field delimiter in sort program in freebsd Message-Id: <20140125231010.b630559b.freebsd@edvax.de> In-Reply-To: References: <52E3C691.8090000@bananmonarki.se> Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Jan 2014 22:10:37 -0000 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); }'` 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, ...