index_points.sh is the script file I use periodically to generate an index of COMPOUND:BLOCK.PARAMETER (C:P.B) connections to all the graphics screen files on our DCS system. You can also find this script at: http://www.geocities.com/fitzgerrell/dcs_stuff/index_points.script.txt Feel free to make use of this script, copy it, re-distribute it, modify it, add it to your library, or whatever else you want to do with it. I have only run any of my scripts on my own system, so it's difficult to judge whether any other systems will have problems running them. I went through and made the remarks a little more meaningful on this one, but if you have questions, feel free to ask. This script makes a couple of assumptions: 1) The % symbol is not used in C:P.B naming. 2) Your graphics screen files are all in a single directory branch, ie. a directory and its subdirectories (and their subdirectories, etc...), such as /usr/disp. 3) The creation of several files in this directory (which can be moved or removed after execution) will not be a problem. Files created are named temp.1 temp.2 connect_screen.txt connect_point.txt so make sure there will not be any name conflicts. To use this script: 1) Copy it to the directory (such as /usr/disp) where screen files and subdirectories containing screen files are located. 2) Make it executable (chmod a+x index_points.script) and rehash if necessary for your shell. 3) Run index_points.script with no parameters. 4) Wait. It takes about 20 minutes on our system for the script to work through all the screen files and run a Display Reporter report on each one. The rest of the script only takes a minute or less. 5) Use the ASCII text files (connect_screen.txt and connect_point.txt) however you want. I print a copy of each for binders every month or two, and I update a searchable database with this information weekly (it is very easy to make the output comma separated if you need it that way for a database). Hope this is helpful! Kevin FitzGerrell Process Control Fairbanks Gold Mining, Inc. ------------------------------------------------------------------------- #!/bin/sh # # Filename: index_points.sh # # Author: Kevin FitzGerrell # Comments to: kfitz@gci.net or fitzgerrell@yahoo.com # # Usage: This script should be located in the directory that contains # all graphics screen files or the parent directory of the # subdirectories containing those graphics files. This script # should be made executable and run with no parameters. # # Description: This will generate data files in table form showing graphic # files and their COMPOUND:BLOCK.PARAMETER (C:B.P) connections. # Some connections will not be listed. These may include: implied # connections (.PARAMETER or BLOCK.PARAMETER), relative picks, # global variable substitution connections, substitution list # connections. # # Created files: "connect_screen.txt" and "connect_point.txt" will be # created in the directory this is run in. Intermediate files # "temp.1" and "temp.2" will be removed. Ensure that these # filenames will not create a conflict in the directory this # is run in. # work in the current directory and all descendent directories # generate a connection report on each graphics file using the # Foxboro Display Reporter tool (d_edit50). find . -exec /usr/fox/wp/bin/tools/d_edit50 -l {} > temp.1 \; # strip out lines that do not have compound:block.parameter references, # keep filename, strip out leading info. egrep '(^ */|^[ 0-9][ 0-9][0-9].*:.*\.)' temp.1 | \ sed 's$^ */$%/$g' | \ awk '{print $NF}' | \ sed 's/%/% /g' > temp.2 # generate listing in form "FILENAME COMPOUND:BLOCK.PARAMETER" of all # points located to file "connect_screen.txt". awk '{if ( $1 == "%" ) fname = $2 else print fname " " $1}' temp.2 | \ sort -u > connect_screen.txt # generate listing in form "COMPOUND:BLOCK.PARAMETER FILENAME" of all # points located to file "connect_point.txt". awk '{if ( $1 == "%" ) fname = $2 else print $1 " " fname}' temp.2 | \ sort -u > connect_point.txt # remove intermediate files rm temp.1 temp.2