[wplug] Scripting - Text file manipulation help - probably perl

Juan Zuluaga jz31416 at yahoo.com
Tue Mar 20 14:40:41 EST 2007


Oh no, Perl is overkill. use gawk instead. 

$ cat ticketing.awk
BEGIN { FS="\t"}
      {print "===Create-Ticket: ticket" $NR "\n";
       print "Queue:\t" $1 "\n";
       print "Subject:\t" $2 "\n";  
       print "\n" }

$ gawk -f ticketing.awk yourfile.tsv 


There are fancy ways to use printf for teh formatting.


 


http://socioenlinea.blog.lemonde.fr/socioenlinea/
Comentarios sobre politica, sociedad y ciencia social.


 
____________________________________________________________________________________
Don't pick lemons.
See all the new 2007 cars at Yahoo! Autos.
http://autos.yahoo.com/new_cars.html 


More information about the wplug mailing list