Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

Add a column of 0's to a text file

$
0
0
Hi,

I have a text file with many column (1,000,000+). I want to add a column of 0's as the third column. I tried:

Code:

awk '{$3=0}1' input file > output file
But it simply replaces the third column with 0's instead of adding a new column. How do I go about doing this? Thanks!

Viewing all articles
Browse latest Browse all 16232

Trending Articles