################################################################## # car2arc.awk: # # Function: Converts a collection of .car/.cor files into a single .arc file # Each file must correspond to the exact same molecule. # # Syntax: nawk -f car2arc.awk test*.car > test.arc ################################################################## BEGIN {n=0} { if (n<2){ #pass through the first 2 lines of the first file n++ print $0 next } if (match($1,"!BIOSYM")){ #on all other files, skip the first 2 lines getline next } print $0 }