Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Aug 2008 15:01:54 +0200
From:      Matthias Apitz <matthias.apitz@oclc.org>
To:        Joseph Olatt <joji@eskimo.com>
Cc:        Steve Bertrand <steve@ibctech.ca>, freebsd-questions@freebsd.org
Subject:   Re: sed/awk, instead of Perl
Message-ID:  <20080821130154.GA11071@rebelion.Sisis.de>
In-Reply-To: <20080821055429.A26910@eskimo.com>
References:  <48AD63B7.8090107@ibctech.ca> <20080821055429.A26910@eskimo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
El día Thursday, August 21, 2008 a las 05:54:29AM -0700, Joseph Olatt escribió:

> Try the following:
> 
> 
>  cat t.txt | awk -F\t '{split($1, arr, "."); printf("%s_%s@%s\n", arr[
> 1], arr[2], $2);}'
> 
> where t.txt:
> john.doe    example.com

Despite of the magic awk(1) or while-loops: this is all UUOC Award;
http://en.wikipedia.org/wiki/Cat_(Unix)#Useless_use_of_cat

:-)

	matthias
-- 
Matthias Apitz
Manager Technical Support - OCLC GmbH
Gruenwalder Weg 28g - 82041 Oberhaching - Germany
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e <matthias.apitz@oclc.org> - w http://www.oclc.org/ http://www.UnixArea.de/
b http://gurucubano.blogspot.com/
We should all learn from the peoples of The Netherlands, France and Ireland.
Aprendamos todos de los pueblos de Holanda, Francia e Irlanda.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080821130154.GA11071>