ADDED mttroot/mtt/bin/trans/mtt_name2array Index: mttroot/mtt/bin/trans/mtt_name2array ================================================================== --- /dev/null +++ mttroot/mtt/bin/trans/mtt_name2array @@ -0,0 +1,57 @@ +#! /bin/sh + + ###################################### + ##### Model Transformation Tools ##### + ###################################### + +# Bourne shell script: mtt_name2array + +# Generates array elements from names +# Copyright (C) 2000 by Peter J. Gawthrop + + +case $2 in + numpar) + name=mttpar + cat $1_sympar.txt>mtt_infile + ;; + state) + name=mttx + cat $1_struc.txt |\ + grep $2 |\ + awk '{printf("%s\n", $4)}'>mtt_infile + ;; + input) + name=mttu + cat $1_struc.txt |\ + grep $2 |\ + awk '{printf("%s\n", $4)}'>mtt_infile + ;; + *) + echo Repesentation $2 not supported +esac + +case $3 in + zero) + strip_comments