#!/bin/tcsh # delete all results # save only needed items from the top level: # set top_dir = `pwd` # if we do not see scripts/cmd.ap.general, we are not in the correct location if ( ! -f scripts/cmd.ap.general ) then echo "** missing atomic file: scripts/cmd.ap.general" echo " --> be careful not to run this from the wrong directory!" exit endif set nuke_list = () foreach file ( * ) # skip any original file if ( "$file" == input_data ) continue if ( "$file" == scripts ) continue set nuke_list = ( $nuke_list $file ) echo "-- planning to delete $file ..." end echo "" echo -n "==> will delete $#nuke_list items, proceed (y/n)? " set inp = $< echo "" if ( $inp == 'y' ) then echo "nuking results..." \rm -fr $nuke_list else echo "NOT deleting anything" endif echo ""