在这样的脚本中,用于按字符串拆分大文件:
awk '/MYSTRING/ {n++}{print >"out_" n ".txt" }' LARGEFILE
这会产生out_1.txt,out_2.txt等.
如何获得split(out_aa.txt,out_ab.txt,out_ac.txt,...)生成的字母前缀?
谢谢
awk split increment prefix
awk ×1
increment ×1
prefix ×1
split ×1