#!/bin/csh -f
#
# noncachefile - give the name of the non-cached file corresponding
# to each cached file given as an argument. One is output on each line.
#
# usage:
#  noncachefile file...
#
# typical usage:
#  set base=`noncachefile $file`
# or
#  set bases=`noncachefile $files`
#

foreach i ($*)
	   if ($i =~ w.* || $i =~ */w.*) then
	       echo $i | sed 's/\(.*\)w\.\([yn]\)\.*\(\.[0-9]\.\.[0-9][0-9][0-9][0-9]\.[0-9][0-9]\.[xetpa]\..*\)/\1N.\2.\3/'
	   else
	       echo $i | sed
's/\(.*\)\/.*\(\.[0-9]\.\.[0-9][0-9][0-9][0-9]\.[0-9][0-9]\.[xetpa]\..*\)/\1\/N.y.\2/'
	   endif
end





