#!/bin/sh if [ $# -ne 2 ] then echo "dssp2dx" echo "converts DSSP output to DireX readable secondary structure input" echo echo "usage: dssp2dx " echo exit fi awk ' BEGIN { l=0 } { if ( l==1 ) { c=substr($0,12,1); if (c==" ") c="A"; } if ( l==1 ) { print substr($0, 0, 11),c, substr($0,13,5); } if ( ($1=="#") && ($2=="RESIDUE") ) { l=1 } }' $1 > $2