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

# Content
1 #!/bin/bash
2
3 DIR=$1
4
5 # Health checks
6 if [ ".$1" == "." ]
7 then
8 echo "";
9 echo "usage: $H <directory-list>";
10 echo ""
11 exit 1
12 fi
13
14 list $DIR | grep root | \
15 while read line
16 do
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 remove --exe $DIR/$file
23 fi
24 done