11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
+
+
+
|
# Copyright (c) P.J.Gawthrop, 1997.
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.2 2002/04/16 11:36:03 gawthrop
## These were flagged with M on cvs update
##
## Revision 1.1 2000/12/28 12:26:15 peterg
## Put under RCS
##
## Revision 1.8 1998/09/29 20:01:27 peterg
## 4th argument for nyquist style files - ie differnt x for each y
##
## Revision 1.7 1997/12/04 22:10:32 peterg
|
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
-
+
|
# ie stack two columns vertically separated by blank lines
#Get the desired data index
which=`name2index $1 "$3"`
echo $1 $3 $which
if [ -z "$DifferentX" ]; then
awk '
gawk '
BEGIN{
row=0; col=0;
}
{
if (row==0) {
N=split(which,Which,",");
}
|
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
-
+
|
if (col<=cols) {
printf("\n")
}
}
}' which="$which" <$1_$2.dat > $1_$2.gdat
else
awk '
gawk '
BEGIN{
row=0; col=0;
}
{
row++; cols=NF/2
for (i=1; i<=cols; i++) {
ycol=2*i;
|