awk line break after each file

前端 未结 3 1445
隐瞒了意图╮
隐瞒了意图╮ 2021-01-28 15:12

With this script every field is printed out according to the longest word of the current file, but needs to have a line break every file. How can this be achieved?



        
3条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-28 15:31

    It's not entirely clear what you are asking for, but perhaps you just want:

    FNR==1 {print "\n"}
    

    Which will print a newline whenever it starts reading the first line of a file. Make sure this pattern/action is before any others so that the newline prints before any other action prints anything for the first line of the current file. (This does not appear to apply in your case, since no such action exists.)

提交回复
热议问题