Revision: | 1.1 |
Committed: | Sun Dec 5 01:01:21 2010 UTC (14 years, 5 months ago) by paus |
Content type: | application/x-sh |
Branch: | MAIN |
CVS Tags: | Mit_020pre1, Mit_018, Mit_017 |
Log Message: | Next iteration with improved downloading tool. |
# | 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 | ls -1l $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` | ||
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" | ||
25 | fi | ||
26 | done |