From owner-freebsd-questions@FreeBSD.ORG Thu Aug 21 13:16:15 2008 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 4B884106564A for ; Thu, 21 Aug 2008 13:16:15 +0000 (UTC) (envelope-from steve@ibctech.ca) Received: from ibctech.ca (v6.ibctech.ca [IPv6:2607:f118::b6]) by mx1.freebsd.org (Postfix) with SMTP id D51508FC1C for ; Thu, 21 Aug 2008 13:16:14 +0000 (UTC) (envelope-from steve@ibctech.ca) Received: (qmail 14438 invoked by uid 89); 21 Aug 2008 13:23:44 -0000 Received: from unknown (HELO ?IPv6:2607:f118::5?) (steve@ibctech.ca@2607:f118::5) by 2607:f118::b6 with ESMTPA; 21 Aug 2008 13:23:44 -0000 Message-ID: <48AD6AF7.7070209@ibctech.ca> Date: Thu, 21 Aug 2008 09:17:43 -0400 From: Steve Bertrand User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Wojciech Puchar References: <48AD63B7.8090107@ibctech.ca> <20080821055429.A26910@eskimo.com> <20080821151330.E7822@wojtek.tensor.gdynia.pl> In-Reply-To: <20080821151330.E7822@wojtek.tensor.gdynia.pl> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Joseph Olatt , freebsd-questions@freebsd.org Subject: Re: sed/awk, instead of Perl 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: Thu, 21 Aug 2008 13:16:15 -0000 Wojciech Puchar wrote: >> >> Try the following: >> >> >> cat t.txt | awk -F\t '{split($1, arr, "."); printf("%s_%s@%s\n", arr[ >> 1], arr[2], $2);}' >> > and third If you have nothing nice to say, or can't contribute or point out more efficient ways of doing things in a polite manner, then 'don't say nothin'. Steve