sed/awk, instead of Perl

Matthias Apitz matthias.apitz at oclc.org
Thu Aug 21 13:01:57 UTC 2008


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 at 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.


More information about the freebsd-questions mailing list