-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCompareRun
More file actions
executable file
·90 lines (64 loc) · 1.45 KB
/
CompareRun
File metadata and controls
executable file
·90 lines (64 loc) · 1.45 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
83
#! /bin/csh
#echo wtf
if( -e tmp1 ) rm tmp1
if( -e tmp2 ) rm tmp2
set file1 = dummiesX
set file2 = dummiesY
set start = 9
set stop = 0
@ stop = $start + 5
if( $1 == "" ) then
echo " "
echo "Compare run <start> <end, f=start+5> <file1> <file2>"
echo " Replace end, file1, or file2 with m to see the "
echo " complete files"
echo " end defaults to start+5"
echo " file1 and file2 default to what's written in this code."
echo " "
else
#
# Set start and stop indicies
# First must be set as a number.
# Second defaults to five more than the first
# or by f = start + 5
# Or the second parameter
set start = $1
@ stop = $start + 5
if( $2 != "f" && $2 != "" && $2 != "m" ) then
set stop = $2
endif
#
# Set filename 1
#
if( $3 != "" && $3 != "m") then
set file1 = $3
endif
#
# Set Filename 2
# If desired, you might want to put a different default here.
#
if( $4 != "" && $4 != "m" ) then
set file2 = $4
endif
echo Compare $file1 and $file2 between $start and $stop
awk '{if(NR >= '$start' && NR <= '$stop') print}' $file1 > tmp1
awk '{if(NR >= '$start' && NR <= '$stop') print}' $file2 > tmp2
diff tmp1 tmp2
if( $2 == "m" || $3 == "m" || $4 == "m" || $5 == "m" ) then
more tmp1 tmp2
endif
#end the Help Screen
endif
#endscript
#echo wtf
##foreach i ( `ls tape*` )
#
# if( `diff $i ~/MHD/Ref10/$i.ref10 | wc -l` != 0 ) then
# echo Problem with $i
# else
# echo $i okay.
# endif
#
#
#end
#echo End