Changes

From CCP4 wiki
Jump to navigationJump to search
no edit summary
Line 12: Line 12:  
'''awk '{if(NR%2) printf "sed -n %d,",$1+1; else printf "%dp > model_%03d.pdb\n", $1-1,NR/2;}' | '''
 
'''awk '{if(NR%2) printf "sed -n %d,",$1+1; else printf "%dp > model_%03d.pdb\n", $1-1,NR/2;}' | '''
 
'''bash -sf'''
 
'''bash -sf'''
 +
 +
== Bash script ==
 +
 +
'''i=1'''
 +
 +
'''while read -a line; do'''
 +
 +
'''    echo "${line[@]}" >> model_${i}.pdb'''
 +
 +
'''    [[ ${line[0]} == ENDMDL ]] && ((i++))'''
 +
 +
'''done < /path/to/file.pdb'''
 +
    
== Perl script ==
 
== Perl script ==
67

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu