DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Automating frequent tasks

Extending the example

The readability analysis program presented above is a useful starting platform for writing your own programs. It provides a skeleton that can be used for either a batch script or an interactive, menu-driven application. It traps unwanted signals and ignores them. It demonstrates how to call short programs written in other languages (bc and awk) from within the shell. Finally, it provides a basic mainloop with callback functions that can be added to.

If you want to customize the script for your own purposes, the place to start is in the callback functions. Strip out the existing functions, and replace them with your own: then change the here-document that displays the opening menu. If you change the keys that trigger the callback functions, remember to modify the case statement below the menu. You can add as many extra callbacks as you like to the menu, but it is a good idea not to provide too many options on any one screen: remember that your users can become confused if confronted with too many choices or too much information.


Next topic: Other useful examples
Previous topic: Readability analysis

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 03 June 2005