<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">#!/bin/csh
# script for renaming files
# from 1xxx_cns_99.pdb to 1xxx_99.pdb etc.

setenv CONV_DIR /u/volkman/at3g01050/validation/conversion

cd $CONV_DIR


set entry = 1xxx
set list = (`\ls $entry"_"[0-9]"_cns".pdb $entry"_"[0-9][0-9]"_cns".pdb`)
echo "Found number of models: $#list"
echo "Found models: $list"


@ count = 1
while ( $count &lt; 21 )
  echo "doing model $count"
  # defining file names
  set inname=$entry"_"$count"_cns".pdb
  set outname=$entry"_"$count.pdb
  \mv -f $inname $outname
  @ count ++
end
</pre></body></html>