template (1) --- manipulate and display templates 03/25/82 _U_s_a_g_e template [-a | -r] [-l{usv}] { } _D_e_s_c_r_i_p_t_i_o_n 'Template' allows the user to expand templates, list the contents of the system template file or his own private tem- plate file, or edit the contents of his private template file. The operation of 'template' is controlled by command line options as follows: -a add or change templates. Any s that appear on the command line are taken in pairs of the form If any template in the user's template file has a name corresponding to , its definition is replaced by ; otherwise, the new template is added to the file. -r remove templates. Each on the command line is taken as the name of a template to be removed from the user's template file. -l list templates. The contents of either the system tem- plate file or the user's private template file, or both, are listed on standard output. The "-l" may be followed by one or more of the following options to control the listing: u list the contents of the user's private template file. s list the contents of the system template file. v print a label before listing each set of tem- plates. If neither the "s" nor the "u" option is specified, "u" is assumed by default. Note that the "-l" option may be used with either the "-a" or the "-r" option to list the modified templates. In the absence of any of the above options, 'template' expands each argument and prints the result on standard output. In order to allow arbitrary strings containing templates to be expanded, it is necessary to enclose the template name in "equals" symbols (=) just as it would appear in a pathname. This is the _o_n_l_y context in which 'template' requires or allows the name of a template to be so enclosed. template (1) - 1 - template (1) template (1) --- manipulate and display templates 03/25/82 _E_x_a_m_p_l_e_s template =date= =time= =doc=/man template -al mybin //mydir/bin.ufd template -r oldtemp template -lusv _F_i_l_e_s =utemplate= for storage of personal templates _M_e_s_s_a_g_e_s "Usage: template ..." for improper options ": duplicate name" if two or more templates with the same name are specified with "-a" ": missing definition" if a template name is not followed by a definition string with "-a" ": may not contain '='" if an attempt is made to add a template name containing an equals sign "file not altered" if either of the previous two messages is issued ": not in template file" if an attempt is made to delete a non-existent template "can't open user template file" if "=utemplate=" can't be opened for reading and writing "can't open temporary file" if a temporary file can't be created for the "-a" and "-r" options _S_e_e _A_l_s_o expand (2), lutemp (6) For more information on templates, see _U_s_e_r_'_s _G_u_i_d_e _t_o _t_h_e _P_r_i_m_o_s _F_i_l_e _S_y_s_t_e_m in the _S_o_f_t_w_a_r_e _T_o_o_l_s _S_u_b_s_y_s_t_e_m _U_s_e_r_'_s _G_u_i_d_e. template (1) - 2 - template (1)