-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCheckArchive
More file actions
executable file
·82 lines (61 loc) · 1.18 KB
/
CheckArchive
File metadata and controls
executable file
·82 lines (61 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#!/bin/csh
#A loop over dataIJKL.
#Copy to a new utility, fill with the goodies you want.
#Tunable variables: nstart, nSteps, basename
set nstart = 0
set n = $nstart
set nSteps = 470
#initial filename: $basename$k$j$i$h
set basename = "data"
set h=0
set i=0
set j=0
set k=0
#
# User defined Setup
#
if( -e Badfiles ) rm Badfiles
touch Badfiles
#
# Main Loop
#
while( $n <= $nSteps )
set step = $k$j$i$h
set Files = "$basename"$step
### Add ddd routine here.
set fileM = `grep $Files InArchive`
set number = `grep $Files InArchive |wc -l`
if( $number == 0 ) then
echo $Files Missing >> Badfiles
echo $Files Missing
else
set size = `echo $fileM |awk '{print $7}'`
echo `echo $fileM | awk '{print $11}'` $size
if ( $size != 8678307840 ) then
echo `echo $fileM | awk '{print $11}'` $size >> Badfiles
endif
endif
###
#
# Counter
#
@ n = $n + 1
@ h = $h + 1
if( $h >= 10 ) then
set h = 0
@ i = $i + 1
if( $i >= 10 ) then
set i = 0
@ j = $j + 1
if( $j >= 10 ) then
set j = 0
@ k = $k + 1
if( $k >= 10 ) then
echo "too many files"
exit
endif
endif
endif
endif
end
#moo