#!/bin/csh -f
set directs=`ls | grep -v untar`
set directparnet=`pwd`

foreach d ($directs)
  echo $d
  cd ${directparnet}/${d}/
  set subdirects=`ls `
  set subdirectparnet=`pwd`
  foreach s ($subdirects)
    cd ${directparnet}/${d}/${s}
    set tarfiles=`ls *tar`
    foreach f ($tarfiles)
       tar xvf $f
       rm -f $f
    end
   end

end

