ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitProd/Processing/bin/removeZeroLengthFiles.sh
(Generate patch)

Comparing UserCode/MitProd/Processing/bin/removeZeroLengthFiles.sh (file contents):
Revision 1.1 by paus, Sun Dec 5 01:01:21 2010 UTC vs.
Revision 1.3 by paus, Thu Oct 20 23:16:23 2011 UTC

# Line 6 | Line 6 | DIR=$1
6   if [ ".$1" == "." ]
7   then
8    echo "";
9 <  echo "usage: $H  <sampleList>";
9 >  echo "usage: $H  <directory-list>";
10    echo ""
11    exit 1
12   fi
13  
14 < ls -1l $DIR | grep root | \
14 > list $DIR | grep root | \
15   while read line
16   do
17 <  size=`echo $line | tr -s ' ' | cut -d ' ' -f 5`
18 <  file=`echo $line | tr -s ' ' | cut -d ' ' -f 9`
17 >  size=`echo $line | tr -s ' ' | cut -d ' ' -f 1`
18 >  file=`echo $line | tr -s ' ' | cut -d ' ' -f 2`
19    if [ "$size" == "0" ]
20    then
21      echo "File: delete $file with $size bytes"
22 <    rm $DIR/$file
23 <  #else
24 <  #  echo "File: -keep- $file with $size bytes"
22 >    remove --exe $DIR/$file
23    fi
24   done

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines