Index: mttroot/mtt/bin/trans/struc2switch_txt ================================================================== --- mttroot/mtt/bin/trans/struc2switch_txt +++ mttroot/mtt/bin/trans/struc2switch_txt @@ -13,10 +13,13 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.5 2000/10/17 09:20:00 peterg +## *** empty log message *** +## ## Revision 1.4 1998/07/26 10:28:30 peterg ## Added a header line to avoid empty file and to trigger ## switch_txt2m to write initial stuff. ## ## Revision 1.3 1998/07/25 18:50:53 peterg @@ -34,15 +37,15 @@ echo Creating $1_switch.txt rm -f $1_switch.txt +echo "# These are the switches deduced from ISW and CSW components"\ + > $1_switch.txt + # This is the main transformation using awk -awk 'BEGIN{ -printf("# These are the switches deduced from ISW and CSW components\n"); -} -{ +awk '{ if ($1=="state") {i++; if ($3=="MTT_SWITCH") print tolower($4) "\t" i}; } END{ } ' < $1_struc.txt| sort >> $1_switch.txt