File mttroot/mtt/bin/trans/name2index artifact c6d2d7651a part of check-in 33addd2c18


#! /bin/sh

     ###################################### 
     ##### Model Transformation Tools #####
     ######################################

# Bourne shell script: name2index

# Converts names to array index

# Copyright (c) P.J.Gawthrop, 1997.

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

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

  


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