ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitProd/Processing/bin/removeZeroLengthFiles.sh
Revision: 1.2
Committed: Sat Mar 19 01:49:13 2011 UTC (14 years, 1 month ago) by paus
Content type: application/x-sh
Branch: MAIN
CVS Tags: Mit_025, Mit_025pre2, Mit_024b, Mit_025pre1, Mit_024a, Mit_024, Mit_023, Mit_022a, Mit_022, Mit_020d, TMit_020d, Mit_020c, Mit_021, Mit_021pre2, Mit_021pre1, Mit_020b, Mit_020a, Mit_020
Changes since 1.1: +4 -6 lines
Log Message:
Small updates here and there.

File Contents

# User Rev Content
1 paus 1.1 #!/bin/bash
2    
3     DIR=$1
4    
5     # Health checks
6     if [ ".$1" == "." ]
7     then
8     echo "";
9     echo "usage: $H <sampleList>";
10     echo ""
11     exit 1
12     fi
13    
14 paus 1.2 list $DIR | grep root | \
15 paus 1.1 while read line
16     do
17 paus 1.2 size=`echo $line | tr -s ' ' | cut -d ' ' -f 1`
18     file=`echo $line | tr -s ' ' | cut -d ' ' -f 2`
19 paus 1.1 if [ "$size" == "0" ]
20     then
21     echo "File: delete $file with $size bytes"
22 paus 1.2 remove --exe $DIR/$file
23 paus 1.1 fi
24     done