How to add text at the end of each line in unix

前端 未结 4 1462
野性不改
野性不改 2020-12-02 20:31

I am doing certain text processing operations and finally able to get a file something like this

india
sudan
japan
france

now I want to add

4条回答
  •  醉酒成梦
    2020-12-02 20:59

    For a more obfuscated approach:

    yes '| COUNTRY' | sed $(wc -l < file)q | paste -d ' ' file -
    

提交回复
热议问题