Consultor Eletrônico



Kbase 13688: clean script to clean up gather script output
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   5/10/1998
clean script to clean up gather script output

#!/bin/sh
# clean.sh
# 12/12/94
# This script is designed to clean up all of the menus
# when running the gather script.
# It is as generic as possible. Different platforms perform
# differently and modifications may need to be made.
# This script was designed for version 6 but can be modified to
# work with version 7 as well. In order to add lines to be stripped
# out do the following steps:
# Edit the clean.sed script and add the line you want to strip out
# at the end adding a slash "/" at the beginning and a slash d "/d"
# at the end.
#
# $1 is the name of the promon file that was generated from gather.
# $2 is the name of the output file to write the information to.
#
# The 2 data files feeding the script are commented in the bottom
# of this script.
#
echo "Reading data from file" $1 "into output file" $2
echo "If this is correct enter y to continue"
read ans
case $ans in
y) echo "processing..."
sed -f clean.sed $1 > sed.$$
sed -f clean2.sed sed.$$ > $2
rm sed.$$
echo "complete processing. File is" $2
exit 0
;;
*) echo "aborted"
exit 1
;;
esac

# clean.sed
# ---------
# clean.sed - this data is fed into the clean.sh script.
#/PROGRESS MONITOR Version 6.0 (R&D)/d
#/Database: \/users\/progress\/db\/vb/d
#/1. User Control/d
#/a. User Control II/d
#/2. Locking and Waiting Statistics/d
#/3. Block Access/d
#/4. Record Locking Table/d
#/5. Index Cursors/d
#/6. Shared Resources/d
#/7. Database Status/d
#/8. Shut Down Database/d
#/9. Activity/d
#/10. Misc. Counts/d
#/11. Space Allocation/d
#/12. I\/O/d
#/13. Queues/d
#/14. Shared Memory Locks/d
#/15. Shared Memory Lock Times/d
#/16. Buffer Pool/d
#/17. Before Imaging (Undo\/Redo Log)/d
#/18. After Imaging (Redo Log)/d
#/19. Shared Memory Segments/d
#/20. Block Table Menu/d
#/T. Transactions Control/d
#/L. Resolve Limbo Transactions/d
#/C. Coordinator Information/d
#/S. Sample Activity Counters Now/d
#/M. Modify Defaults/d
#/Q. Quit/d
#/Enter your selection: /d
#/1. Display all entries/d
#/2. Match a user number/d
#/3. Match a range of user numbers/d
#/Q. Return to main menu/d
#
# clean2.sed
# ----------
# This information is used in the clean.sh script
# This file takes the input and deletes lines down to 1 blank line
# between sections.
#/^$/{
#N
#/^\n$/D
#}
# END of script...


Progress Software Technical Support Note # 13688