Index: mttroot/mtt/bin/mtt_help ================================================================== --- mttroot/mtt/bin/mtt_help +++ mttroot/mtt/bin/mtt_help @@ -12,10 +12,13 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.10 1998/05/18 08:35:19 peterg +## Surround arguments to tr with "" +## ## Revision 1.9 1998/03/26 08:23:02 peterg ## Use mixed case Topic for *) part of case sttement ## ## Revision 1.8 1998/03/22 21:13:17 peterg ## Fixed bug in above @@ -61,16 +64,17 @@ fi ext='_[cl]*.*[mt]' summary='[%#]SUMMARY' description='[%#]DESCRIPTION' +alias='[%#]ALIAS' case $topic in components) key=$summary find_path=$MTT_COMPONENTS - name='*_*.*' + name='' sort='sort -u' blurb="Components";; crs) key=$summary @@ -80,11 +84,11 @@ blurb="Constitutive Relationships";; examples) key=$summary find_path=$MTT_EXAMPLES - name='*_lbl.txt' + name='' all='all' sort='sort -u' blurb="Examples";; representations) @@ -94,36 +98,32 @@ all='all' sort='sort -u' blurb="Representations";; *) - key="\"$summary|$description\"" + key="$summary|$description|$alias" find_path=$MTT_LIB - name=$Topic$ext - all='' + name=$Topic + all='all' sort='cat' blurb=$Topic;; + esac subtopic=$2 if [ "$subtopic" = "" ]; then subtopic='.' fi; echo $blurb - mtt_find $find_path "$name" "egrep -i $key.*$subtopic" $all|\ - sed "s/$summary[ ]*/ /" |\ + + mtt_find $find_path "$name" |\ + awk '{print "cat " $1 "/" $2}' | sh |\ + egrep $key |\ + sed "s/$summary[ ]*//" |\ sed "s/$description[ ]*/ /" |\ + sed "s/$alias[ ]*/ Alias: /" |\ sed "s!$find_path/!!" |\ $sort - - - - - - - - -