CONV(1) USER COMMANDS CONV(1) NAME conv - General character to string conversion program SYNOPSIS conv [ -_m ] _t_a_b_f_i_l_e [ _i_n_f_i_l_e [ _o_u_t_f_i_l_e [ _m_e_s_s_f_i_l_e ] ] ] DESCRIPTION _c_o_n_v is a simple character-to-string conversion program. _t_a_b_f_i_l_e is the name of a table describing the character-to- string conversions that the user wishes to make, _i_n_f_i_l_e (default: standard input) is the file to be converted, _o_u_t_- _f_i_l_e (default: standard output if _i_n_f_i_l_e is not specified but _i_n_f_i_l_e.conv if _i_n_f_i_l_e is specified) is the file created by _c_o_n_v, and _m_e_s_s_f_i_l_e (default name "messages.conv") is a file containing a list of the conversions that _c_o_n_v found in _t_a_b_f_i_l_e and a report of _c_o_n_v'_s failures in converting _i_n_f_i_l_e to _o_u_t_f_i_l_e according to _t_a_b_f_i_l_e, chiefly indicating which characters it found in _i_n_f_i_l_e for which there were no corresponding entries in _t_a_b_f_i_l_e. The -_m switch suppresses _m_e_s_s_f_i_l_e. The format for _t_a_b_f_i_l_e is a sequence of lines each ter- minated with a "newline" character (under UNIX a "newline" is a single character with ASCII value 10 (hex 0A). The first character of each line is the character for which the remainder of that line up to (but not including) the newline is the substitution string. The current version of _c_o_n_v enables the user to make string substitutions for each of the possible values of a character including the "null" and "newline" characters. It is also possible to cause a character to be replaced by the empty string. For this purpose the character '#' serves as the "escape" character in _t_a_b_f_i_l_e. The recognized escape sequences are: ## the character '#' #0 the null character #N or #n the newline character A '#' preceding anything else is ignored. The _t_a_b_f_i_l_e must not contain literal nulls or literal newlines (except in the latter case at the end of each line). _C_o_n_v was designed for use in converting MTE (mathematical typewriter emulation) files into files containing corresponding printer instruction strings. It can also be used for other types of conversion. For example, when used with a one line _t_a_b_f_i_l_e containing the single line: #N#N Sun Release 4.1 Last change: 19 Aug 1997 1 CONV(1) USER COMMANDS CONV(1) where is a "carriage return" character with ASCII value 13 (hex 0D), _c_o_n_v will change a text file from UNIX text format to MSDOS (or VMS) format. The reverse conversion may be performed with a _t_a_b_f_i_l_e in which the only line is: (where an empty substitution string is specified for the "carriage return" character). FILES /_m_a_t_h/_l_o_c_a_l/_a_u_x/_c_n_v_t_a_b -- public _t_a_b_f_i_l_e'_s. BUGS Please report bugs, problems or comments to W. F. Hammond at the email address "hammond@math.albany.edu". Sun Release 4.1 Last change: 19 Aug 1997 2