From owner-freebsd-questions@FreeBSD.ORG Sat Jan 25 13:59:13 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 850D9B82 for ; Sat, 25 Jan 2014 13:59:13 +0000 (UTC) Received: from mail-qc0-f173.google.com (mail-qc0-f173.google.com [209.85.216.173]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 34E2013AB for ; Sat, 25 Jan 2014 13:59:12 +0000 (UTC) Received: by mail-qc0-f173.google.com with SMTP id i8so5884945qcq.32 for ; Sat, 25 Jan 2014 05:59:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=4m3LvzqqLWjjyqQI6YVZs8eARa/+fVnC4twI8Impjdo=; b=nJSxbiIN1VWt81IhPfXWQd9mifCFECbNQW8GeGmn4goSgWYuF8B6qD3idqmBuWm4o4 z+C1RAfMuMs/KyZS4M4nN0BLhZb3uhLB3JWdwSLcJ+NIy9jpdv1YsdSy/RDRo+2SOoLk 1sU0AfN57mAc8R99jUkrnOVzFFAmOjTCHdMnQw5W4S5/S0kA4Xim8uzSogsRVGLMXhgC kpQ90PM4dG8jhZ2zx/0s5QyJ0hPpdiionJbnAbpTv2V7foXoWv4tH9rM7X5MpXD9KHNK cuf1IeQrbOLkehUzicS2PeIVVzgGthBcCxaQ11I9laY5ZyIkAmUc9OxDKJlNqD4pMRNE h8iQ== X-Gm-Message-State: ALoCoQmWxKZoDt3MOffCMDBZo/cqVupa5cMn1+e39m0vYEQTEmXoc1h2Elxrns5c1Wo2MJIkKhnN MIME-Version: 1.0 X-Received: by 10.140.98.33 with SMTP id n30mr27069463qge.8.1390658351964; Sat, 25 Jan 2014 05:59:11 -0800 (PST) Received: by 10.229.193.8 with HTTP; Sat, 25 Jan 2014 05:59:11 -0800 (PST) X-Originating-IP: [184.148.68.164] Date: Sat, 25 Jan 2014 08:59:11 -0500 Message-ID: Subject: Field delimiter in sort program in freebsd From: Shayan Pooya To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.17 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 13:59:13 -0000 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. On bash: sort -t $'\xfe' works fine, but: $ sort -t $'\xff' complains: sort: Invalid argument (Just in case, this is the piece of code that runs on MacOS and Linux but not on FreeBSD: https://github.com/discoproject/disco/blob/develop/lib/disco/compat.py#L79because of this issue). Thanks.