Overview
Comment:Handles argument list - variable names.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: a2854f96b3d302056d812b0ccd409252ca5cabfdcaaa30524458590ca386f716
User & Date: gawthrop@users.sourceforge.net on 1997-12-04 22:10:18
Other Links: branch diff | manifest | tags
Context
1997-12-06
12:14:39
Put a conditional around the PS data rep to check for set arguments. check-in: 4468bac967 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
1997-12-04
22:10:18
Handles argument list - variable names. check-in: a2854f96b3 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
22:06:53
Added view arguments for graph plotting check-in: ab1b2fc5cb user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/name2index from [231060ba2b] to [4e9682d136].

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
# Copyright (c) P.J.Gawthrop, 1997.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$



## Revision 1.2  1997/05/22 09:28:22  peterg
## Removed trailing , in output.
##
## Revision 1.1  1997/05/22 08:48:21  peterg
## Initial revision
##
###############################################################

awk '
{
  name_index[$4"_"$3]=$2;
}
END{
  N=split(names,Names,",");
  if (N==0)
    printf("0\n")




  else {





    for (i=1; i<N; i++)
      printf("%i,",name_index[Names[i]]);
  printf("%i\n",name_index[Names[N]]);
  }
}'  names=$2 < $1_struc.txt

  







>
>
>













|
|

>
>
>
>
|
>
>
>
>
>

|
|




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
# Copyright (c) P.J.Gawthrop, 1997.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.3  1997/05/22 09:42:48  peterg
## Returns 0 if no names.
##
## Revision 1.2  1997/05/22 09:28:22  peterg
## Removed trailing , in output.
##
## Revision 1.1  1997/05/22 08:48:21  peterg
## Initial revision
##
###############################################################

awk '
{
  name_index[$4"_"$3]=$2;
}
END{
  M=split(names,xynames,":");
  if (M==0)
    printf("0\n")
  else
    {
    if (M==1) 
      printf("1,");
    else {  
        printf("%i,",name_index[xynames[1]]+1);
        names=xynames[2]
       }

    N=split(names,Names,",");
    for (i=1; i<N; i++)
      printf("%i,",name_index[Names[i]]+1);
  printf("%i\n",name_index[Names[N]]+1);
  }
}'  names=$2 < $1_struc.txt

  


MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]