#! /bin/csh if ( $argv < 1 ) then echo Need max number of residues exit 1 endif set resmax = $1 /bin/rm -f NUM tail +19 1fsc_e1-8_p2_num.p2 | cut -c1-10 > NUM set i = 1 set j = 15 while ( $j - 15 < $resmax ) /bin/rm -f all$j.p2 cp NUM all$j.p2 while ( $i < $j + 1 ) set fnam = 1fsc_e1-8_p2_$i.p2 if ( -e $fnam ) then echo $fnam exists paste all$j.p2 $fnam >NUMtmp /bin/mv NUMtmp all$j.p2 else echo no file for $i ... $fnam endif @ i = $i + 1 end @ j = $j + 15 end