From owner-freebsd-questions@FreeBSD.ORG Thu Nov 6 17:06:41 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 63465500 for ; Thu, 6 Nov 2014 17:06:41 +0000 (UTC) Received: from smtpq2.tb.mail.iss.as9143.net (smtpq2.tb.mail.iss.as9143.net [212.54.42.165]) by mx1.freebsd.org (Postfix) with ESMTP id 1ACD7B53 for ; Thu, 6 Nov 2014 17:06:40 +0000 (UTC) Received: from [212.54.42.135] (helo=smtp4.tb.mail.iss.as9143.net) by smtpq2.tb.mail.iss.as9143.net with esmtp (Exim 4.76) (envelope-from ) id 1XmQ8z-0003eV-C9; Thu, 06 Nov 2014 17:42:45 +0100 Received: from 5419839c.cm-5-2c.dynamic.ziggo.nl ([84.25.131.156] helo=ra.boosten.org) by smtp4.tb.mail.iss.as9143.net with esmtp (Exim 4.76) (envelope-from ) id 1XmQ8z-00079y-5O; Thu, 06 Nov 2014 17:42:45 +0100 Received: from ra.egypt.nl (localhost.egypt.nl [127.0.0.1]) by ra.boosten.org (Postfix) with ESMTP id AE6A4398E0; Thu, 6 Nov 2014 17:42:44 +0100 (CET) X-Virus-Scanned: amavisd-new at boosten.org Received: from ra.boosten.org ([127.0.0.1]) by ra.egypt.nl (ra.egypt.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cb4P0ACy_H2C; Thu, 6 Nov 2014 17:42:44 +0100 (CET) Received: from mbp.egypt.nl (mbp.egypt.nl [192.168.13.33]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ra.boosten.org (Postfix) with ESMTPSA id 1ED1239860; Thu, 6 Nov 2014 17:42:44 +0100 (CET) Mime-Version: 1.0 (Mac OS X Mail 8.0 \(1990.1\)) Subject: Re: uniq(1) on last field From: Peter Boosten In-Reply-To: <20141106110319.eb34eaa069a4881824072010@3dresearch.com> Date: Thu, 6 Nov 2014 17:42:40 +0100 Message-Id: References: <20141106110319.eb34eaa069a4881824072010@3dresearch.com> To: Janos Dohanics X-Mailer: Apple Mail (2.1990.1) X-Ziggo-spambar: ---- X-Ziggo-spamscore: -4.9 X-Ziggo-spamreport: ALL_TRUSTED=-1, BAYES_00=-1.9, HTML_MESSAGE=0.001, PROLO_TRUST_RDNS=-3, RDNS_DYNAMIC=0.982, SPF_PASS=-0.001 X-Ziggo-Spam-Status: No X-Spam-Status: No X-Spam-Flag: No Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: FreeBSD Questions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Nov 2014 17:06:41 -0000 > > > I would like to use uniq(1) on the file name, which is of course the > last field if / is used as field separator. > > How can I tell uniq(1) the "last field" if I have variable number of > fields? sort -u might be a better option -- Peter Boosten