From owner-freebsd-questions@FreeBSD.ORG Sun Jan 26 02:36:28 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 58524256 for ; Sun, 26 Jan 2014 02:36:28 +0000 (UTC) Received: from leila.iecc.com (leila6.iecc.com [IPv6:2001:470:1f07:1126:0:4c:6569:6c61]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D25A41E4C for ; Sun, 26 Jan 2014 02:36:27 +0000 (UTC) Received: (qmail 86851 invoked from network); 26 Jan 2014 02:36:24 -0000 Received: from leila.iecc.com (64.57.183.34) by mail1.iecc.com with QMQP; 26 Jan 2014 02:36:24 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=iecc.com; h=date:message-id:from:to:cc:subject:in-reply-to:mime-version:content-type:content-transfer-encoding; s=52e474a9.xn--i8sz2z.k1401; i=johnl@user.iecc.com; bh=9f7dlMb/GYrQ+gxfViPLdro6qf15qCWnwH5Qp+HXTrY=; b=nIJOHUpsci9PquGa+EIrGeViHRFtqKASd+PeSSHYsXPPqF1K/2SV35Qxpy5iQcv0llDOnQTtB6WBatWvw/EkCXhhAmOp1/YCMran9ljSBjoOsukaGDHJ3N/mCEklKwVZg/2C2c5xN7qErllt/8sf2QUDGFP4UQBEnN8Xim1FxD6K/LEDriRFqGE6IskcC1nEKDsjSoLSM+saus8NwIJ5/Rf30NjqfXHIC8twgh/Ec9YpqRJtWrGCrJzhGvIUWxFU Date: 26 Jan 2014 02:36:02 -0000 Message-ID: <20140126023602.95324.qmail@joyce.lan> From: "John Levine" To: freebsd-questions@freebsd.org Subject: Re: Field delimiter in sort program in freebsd In-Reply-To: Organization: X-Headerized: yes Mime-Version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: 8bit Cc: shayan@liveve.org 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: Sun, 26 Jan 2014 02:36:28 -0000 >Using \xff as the record separator makes sense for binary files. Any idea >why there is such a condition in the sort program? Probably because its authors implemented the POSIX spec for the sort utility, which sorts text files. If you want to sort binary stuff using the standard sort program, turn it into text, sort it, and turn it back. Or write your own specialized binary sort. R's, John