ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitProd/Processing/bin/removeZeroLengthFiles.sh
Revision: 1.3
Committed: Thu Oct 20 23:16:23 2011 UTC (13 years, 6 months ago) by paus
Content type: application/x-sh
Branch: MAIN
CVS Tags: Mit_025c_branch1, Mit_025c_branch0, Mit_025c, Mit_025b, Mit_025a
Branch point for: Mit_025c_branch
Changes since 1.2: +1 -1 lines
Log Message:
Adjusting....

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 paus 1.3 echo "usage: $H <directory-list>";
10 paus 1.1 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