Overview
Comment:Flips the order of alias and name when $ is involved.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 2875085cc0f33de561b2d6e5b6b4232ac4d06061c783fe4d92e51e67a6eff9fe
User & Date: gawthrop@users.sourceforge.net on 1998-07-03 13:49:03.000
Other Links: branch diff | manifest | tags
Context
1998-07-03
14:01:43
Aliases for parameters check-in: 26ae39787b user: gawthrop@users.sourceforge.net tags: origin/master, trunk
13:49:03
Flips the order of alias and name when $ is involved. check-in: 2875085cc0 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
10:12:18
New aliased parameter form check-in: 386a202d09 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes
︙︙
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
# Copyright (c) P.J.Gawthrop 1998

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



## Revision 1.1  1998/07/02 09:22:10  peterg
## Initial revision
##
## Revision 1.2  1998/07/02 08:34:00  peterg
## Renamed to lbl2alias_txt2txt
##
## Revision 1.1  1998/07/02 08:14:07  peterg
## Initial revision
##
###############################################################

# Inform user
echo Creating $1_alias.txt

#Create the alias file complete with headers.
echo "# Alias file ($1_alias.txt)" > $1_alias.txt
echo "# Generated by MTT at `date`" >> $1_alias.txt

#Write out the variables 
grep '[%|#]ALIAS' $1_lbl.txt |\
awk '{







    n=split($2,a,"|");
    for (i=1; i<=n; i++)
      print a[i],$3;



      }' >> $1_alias.txt
















>
>
>



















|
|
>
>
>
>
>
>
>
|
|
|
>
>
>
|









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

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.2  1998/07/03 07:54:39  peterg
## Tidied
##
## Revision 1.1  1998/07/02 09:22:10  peterg
## Initial revision
##
## Revision 1.2  1998/07/02 08:34:00  peterg
## Renamed to lbl2alias_txt2txt
##
## Revision 1.1  1998/07/02 08:14:07  peterg
## Initial revision
##
###############################################################

# Inform user
echo Creating $1_alias.txt

#Create the alias file complete with headers.
echo "# Alias file ($1_alias.txt)" > $1_alias.txt
echo "# Generated by MTT at `date`" >> $1_alias.txt

#Write out the variables 
    grep '[%|#]ALIAS' $1_lbl.txt |\
    awk '{
      if (match($2,"\\$")==0){
        alias=$2; name =$3
      }
      else{
        alias=$3; name =$2
      }
      sub(",","__",alias); #Replace ,
      n=split(alias,a,"|");
      for (i=1; i<=n; i++)
        print a[i] "\t" name;
	 }
      END{
      print "###_END_OF_ALIAS_###"
     }' >> $1_alias.txt










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