DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Frame definition files

Defining a text frame with readfile and longline

A more interesting way to define a text frame is to use the built-in utilities readfile and longline:

   title="This is a Text Frame"
   lifetime=longterm
   text="`readfile $ARG1`"
   columns=`longline`

Text.readfile: an example of using readfile and longline in a text frame

Text.readfile illustrates the use of arguments that may be passed to menu, text, or form frames. You do not have to define a separate text frame definition file for each file that is to be displayed. Instead, pass $ARG1 to the text frame when you open it.

For example, if Text.readfile were opened by a line in a menu that looked like this:

   action=open $DEF_FILES/Text.readfile help1
$ARG1 would evaluate to help1, that file would be read by the built-in utility readfile, and all of the text in help1 would become the value of the text descriptor, which would then be displayed in a text frame as wide as the longest line of text in the file help1. For more on how this happens, see ``Variables'', and the readfile(1fmli) manual page.
Next topic: Using text frame headers and terminal attributes
Previous topic: Text.USA: screen output

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004