awk: printing a tab-delimited instead of a space-delimited file -


i using awk command print out columns of file

awk '{print $1,$2,$3,$5,log($11),$12}' inputfile > outputfile 

the inputfile tab-delimited, , outputfile space-delimited. need outputfile tab-delimited well. tried this, still gives me space-delimited file:

awk 'begin{fs="\t"}{print $1,$2,$3,$5,log($11),$12}' inputfile > outputfile 

what doing wrong? many thanks!

i think want ofs="\t", set output field separator.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -