From owner-freebsd-questions@FreeBSD.ORG Wed May 18 22:06:08 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C2B51065673 for ; Wed, 18 May 2011 22:06:08 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id D282C8FC14 for ; Wed, 18 May 2011 22:06:07 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.4/8.14.4) with ESMTP id p4IM66Mt059949; Wed, 18 May 2011 16:06:06 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.4/8.14.4/Submit) with ESMTP id p4IM66og059946; Wed, 18 May 2011 16:06:06 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Wed, 18 May 2011 16:06:06 -0600 (MDT) From: Warren Block To: Devin Teske In-Reply-To: <000d01cc158a$639dfc30$2ad9f490$@vicor.com> Message-ID: References: <20110518174141.GA62977@thought.org> <000801cc1588$1cf81e20$56e85a60$@vicor.com> <000d01cc158a$639dfc30$2ad9f490$@vicor.com> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (wonkity.com [127.0.0.1]); Wed, 18 May 2011 16:06:06 -0600 (MDT) Cc: 'Gary Kline' , 'FreeBSD Mailing List' Subject: RE: kwik way? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 May 2011 22:06:08 -0000 On Wed, 18 May 2011, Devin Teske wrote: > In case you were thinking of either awk or perl, I'd recommend against those > given the following results: > ... > > $ time sh -c "perl -pe 'tr/\t/ /' < foo > bar" > real 0m0.565s > user 0m0.277s > sys 0m0.137s > $ md5 bar > MD5 (bar) = f0187bcbc37cd6d84c6f5cadc6443843 While Perl is a quarter of a second slower than best-case sed, it does offer the ability to directly understand \t (and \n, and lots of other escapes).