Reputation: 4045
I have a 3 column file. I would like to append a third column which is just one word repeated many times. I tried the following
paste file.tsv <(echo 'new_text') > new_file.tsv
But the text 'new_text' only appears on the first line, not every line.
How can I get 'new_text' to appear on every line.
Thanks
Upvotes: 1
Views: 252
Reputation: 6692
sed '1,$ s/$/;ABC/' infile > outfile
This replaces the line end ("$") with ";ABC".
Upvotes: 2