- # 2>nul&@gawk -f %0 drug>$New.txt&exit
- BEGIN{
- printf("ENTRY PATHWAY\n")
- while((getline<"pathway.txt")>0) {split($0,tmp," ");pathway[substr($0,match($0,"[ ]")+1)]=tmp[1]}P="~"
- }
- {
- if($1~"///") {
- printf("%-15s %s\n",E,P);P="~"
- } else if($1~"ENTRY") {
- E=$2
- } else if(GoOn==0&&$0~/[a-z]+[0-9]+/&&$0!~"COMMENT") {
- temp=pathway[substr($0,index($0,")")+3)];if(temp!=0) P=P!="~"?P" "temp:temp
- } else if($0!~/[a-z]+[0-9]+/) {
- GoOn=1
- } else if($0~"PATHWAY") {
- temp=pathway[substr($0,index($0,")")+3)]
- if(temp!=0)P=P!="~"?P" "temp:temp;GoOn=0}
- }
复制代码
|