How to give space between columns?

前端 未结 4 1813
醉梦人生
醉梦人生 2021-01-27 16:13

I have a text file as shown below.I would like to give a space between the character and number in the fifth column. How can I do this with awk?

cxe  911  bv  he         


        
4条回答
  •  庸人自扰
    2021-01-27 16:48

    I haven't tested it, But I guess this should work.

    awk '{$5=substr($5,0,1)" "substr($5,1);print}' your_file
    

提交回复
热议问题