How to give space between columns?

前端 未结 4 1778
醉梦人生
醉梦人生 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:57

    assuming your fifth column starts with a single character,

    {
      if(sub(/^./, "& ", $5)) {
        print $0;
      } 
    } 
    

提交回复
热议问题