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
|
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
|
+
+
+
-
+
|
# Copyright (c) P.J.Gawthrop, 1997, 1999
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.1 2000/12/28 12:26:34 peterg
## Put under RCS
##
## Revision 1.1 1999/03/28 21:29:40 peterg
## Initial revision
##
###############################################################
if [ "$2" = "odes" ]; then
which="state"
else
which="output"
fi
awk '
BEGIN{
printf("Time");
}
{
if ($1==which)
printf(" %s(%s)", $3, $5);
printf(" %s(%s)", $4, $5);
}
END{
printf("\n");
}
' SYSTEM=$1 which=$which < $1_struc.txt
cat $1_$2.dat
|