- 论坛徽章:
- 32
|
- [root@localhost ~]# head a b
- ==> a <==
- aaaaaaaaaaaaaaaaaaaaaaaaaaa
- bbbbbbbbbbbbbbbbbbbbbbbb
- ccccccccccccccccccccccccccccccc
- ==> b <==
- ddddddddddddddddddddddd
- fffffffffffffffffffffffffffffffffffffffff
- hhhhhhhhhhhhhhhhhhhhhhh
- [root@localhost ~]# awk 'NR==FNR{s=s"\n"$0;next}/^$/{getline;print s,$0}1' b a
- aaaaaaaaaaaaaaaaaaaaaaaaaaa
- bbbbbbbbbbbbbbbbbbbbbbbb
- ddddddddddddddddddddddd
- fffffffffffffffffffffffffffffffffffffffff
- hhhhhhhhhhhhhhhhhhhhhhh
- ccccccccccccccccccccccccccccccc
- [root@localhost ~]#
复制代码 |
|