File Clean.com:
#!/bin/csh |
set dirList = (‘getTabCol.tcl -in $meta -var DIR_NAME’) |
set proc = (‘getTabCol.tcl -in $meta -var PROC_FLAG’) |
set origDir = ‘pwd’ |
set fList = (ext.dat ext.txt score.tab \ |
ist.ft1 ist.ft2 scale.ft2 mask.fid mask.ft1 profY.dat ser_full clip.ft2 tmp.fid |
tmp.ft2 \ |
test.fid test.ft1 test.tmp test.ft2 ps.ft1 mask.ft2 ext.dat ps.dat \ |
orig.ft2 sierra.ft2 \ |
phase1.out phase2.out conv.out proc.out) |
@ i = 0 |
foreach d ($dirList) |
@ i++ |
if $proc[$i] then |
cd $d |
echo “Cleaning $d …” |
foreach f ($fList) |
if (-e $f) then |
echo “ $f” |
/bin/rm -f $f |
endif |
end |
cd $origDir |
else |
echo $d/ keeping files |
endif |
end |
foreach d (‘find ./ -type d -name pca\* -print’) |
if (-d $d/pca) then |
echo “Cleaning $d …” |
/bin/rm -rf $d |
endif |
end |
foreach d (interp ext ascii_full ascii_ext) |
if (–d $d) then |
/bin/rm –rf $d |
endif |
end |