本帖最后由 bailong360 于 2015-3-28 19:32 编辑
用于整理为四个 | | | BEGIN { | | while((getline<"fenzyme.txt")>0) type1[a++]=$0; | | while((getline<"fenzyme2.txt")>0) type2[b++]=$0; | | while((getline<"fenzyme2.txt")>0) type3[c++]=$0; | | while((getline<"fenzyme2.txt")>0) type4[d++]=$0; | | for(i=1;i<=4;i++) printf("ENTRY ATC code Drug group Therapeutic category PATHWAY\n")>>"$type"i".txt"; | | } | | NR>1{ | | for(i in type1) | | if("'"$1"'"==type1[i]) print $0 >>"$type1.txt"; | | for(i in type2) | | if("'"$1"'"==type2[i]) print $0 >>"$type2.txt"; | | for(i in type3) | | if("'"$1"'"==type3[i]) print $0 >>"$type3.txt"; | | for(i in type4) | | if("'"$1"'"==type4[i]) print $0 >>"$type4.txt"; | | }COPY |
是否符合要求?
测试文本带单引号
Eg: 'D00001' |