#!/bin/csh

if($#argv == 0) then
  echo "USAGE: ima-parse-name imafilename(s)"
  echo "  Returns: series run image"
  exit 1;
endif

foreach ima ($argv)

  # Filename is of the form:  series-run-image.ima ##

  ## Strip off .ima and any leading directory name ##
  set base = `basename $ima .ima`;

  ## Replace "-" with " " (ie, space) ##
  echo $base | sed 's/-/ /g'

end

exit 0
###############
