#
if ( $1 == ) then
  echo "Syntax:  mvredux go"
  echo "  This will create subdirectories in your reduction directory"
  echo "  and move various reduction output files into the subdirectories."
  echo "  (e.g., Flux-*.fits will go into ./Flux )."
  exit 0
endif
#
if !(-e Arc) then
  mkdir Arc
endif
mv Arc-* Arc
#
if !(-e Sum) then
  mkdir Sum
endif
mv Sum-* Sum
#
if !(-e Sky) then
  mkdir Sky
endif
mv Sky-* Sky
#
if !(-e Var) then
  mkdir Var
endif
mv Var-* Var
#
if !(-e Flat) then
  mkdir Flat
endif
mv Flat-* Flat
#
if !(-e s2n) then
  mkdir s2n
endif
mv s2n-* s2n
#
if !(-e DN) then
  mkdir DN
endif
mv DN-* DN
#
if !(-e Flux) then
  mkdir Flux
endif
mv Flux-* Flux
mv Err-* Flux
#
if !(-e trace) then
  mkdir trace
endif
mv trace-* trace
#
if !(-e profiles) then
  mkdir profiles
endif
mv profiles_* profiles-* profiles
#
if !(-e Log) then
  mkdir Log
endif
mv *.log Log
