Overview
Comment: | Initial revision |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
0c7659c6b441ae8333632b2ddb4fc159 |
User & Date: | gawthrop@users.sourceforge.net on 2000-10-16 09:04:04 |
Other Links: | branch diff | manifest | tags |
Context
2000-10-16
| ||
09:06:26 | Write out the system as a second columns as well check-in: 1be98f1589 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
09:04:04 | Initial revision check-in: 0c7659c6b4 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
08:40:35 | Whoops! Must touch mtt_aliased check-in: 9ec4981fa6 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Added mttroot/mtt/bin/trans/mtt_strip_args version [c68ef708a3].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 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 | #! /bin/sh ###################################### ##### Model Transformation Tools ##### ###################################### # Bourne shell script: strip args # Strips unwanted bits from a list of arguments # Label file to symbolic parameters conversion # Copyright (C) 2000 by Peter J. Gawthrop ## $Id$ ## ## $Log$ ## # Inform user #echo "Creating $1_sympar.txt" # Separation characters SEPS='=*;+/()-' # Replace by , REPS=',,,,,,,,' # This is the main transformation using gawk tr $SEPS $REPS | \ awk ' function exact_match(name1, name2) { return ((match(name1,name2)>0)&&(length(name1)==length(name2))) } function matches(names, name) { n_matches = split(names,match_name); matched = 0; for (i_matches = 1; i_matches <= n_matches; i_matches++) { if ( exact_match(name,match_name[i_matches]) ) { matched = 1; break; } } return matched; } BEGIN { not_an_arg = "effort flow state internal external zero unknown\ mtt_e mtt_f sqrt exp log sign none abs"; } { args=$1 N=split(args, arg, ","); for (i=1;i<=N;i++){ if ( (length(arg[i])>0)&&(matches(not_an_arg,arg[i])==0)&&(match(arg[i],"^[0-9]+[.]*")==0) ){ print arg[i] } } }' |\ grep -v '^\$' |