有-v的时候就没问题
[root@localhost test_3]# cat professor.db|awk -v RS="\n\n" '{gsub("\n","@") ;print}'
J Luo@Southeast University@Nanjing,China
Y Zhang@Victory University@Melbourne.Australia
D Hou@Beijing University@Beijing,China
B Liu@Shanghai Jiaotong University@Shanghai,China
C Lin@University of Toronto@Toronto,Canda
没有-v就这个错误
[root@localhost test_3]# cat professor.db|awk RS="\n\n" '{gsub("\n","@") ;print}'
awk: RS=\n\n
awk: ^ 反斜杠不是行的最后一个字符