#!/bin/sh

code=$1

file=`grep $code $PDBENT | sed -e 's;\.Z$;;'`
# eval $file 2> tmp.tmp
# file=`awk '{print $1}' tmp.tmp | sed -e 's;:;;g`
# rm tmp.tmp

fileZ="$file".Z

if [ -f "$fileZ" ] ; then
  echo REMARK    "$fileZ"
  zcat "$fileZ" | less
else
  if [ -f "$file" ] ; then
    echo REMARK   "$file"
    cat "$file" | less 
  else
    echo REMARK $fileZ
    echo REMARK $file
    echo NON-EXISTING
  fi
fi
