awk - add column of 1's to tab-delimited file -


can't find solution, though thousands of variations of question have been asked.

i want add column of 1's tab-delimited file using awk or sed.

the file have 20 million lines, efficient nice.

turn this:

a   b   c r   j   k   t   w 

into this:

a   b   c   1 r   j   k   1   t   w   1 

assuming used awk -f'\t' instead of awk:

{     print $0 fs 1; } 

if didn't use -f option, replace fs 1 "\t1".


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -