FWID(1) User Commands FWID(1) NAME fwid - Fix the width of a file SYNOPSIS fwid _w_i_d_t_h [ -_t ] [ _f_i_l_e ] DESCRIPTION fwid fixes the width of a file that is organized into lines or intended for such organization. The argument _w_i_d_t_h is required. Use width = 0 to remove all "hard" newlines from a file. fwid always writes to standard output and reads standard input if no _f_i_l_e is specified on the command line. The optional -_t switch prevents any existing newline from being removed. When -_t is set, fwid will enforce the speci- fied width only by dividing existing lines. Otherwise fwid reorganizes the newlines in a file to generate output of the specified width. Any removed newline is replaced by a blank. Any chain of two or more consecutive newlines will be preserved. The program was originally designed for use with character- stream mathematical text containing "displays". Such a "display" is preserved when it is not broken by a newline (even though upon viewing it may appear to occupy several lines) provided that it conforms to the width limitation set on the command line. Likewise, any "display" that does not involve text on consecutive lines is preserved when it con- forms to the prescribed width. If the input contains a word longer than the specified width, the word will be broken in order to enforce the width. This has the effect of making the number of words in the output one larger than the number of words in the input. As a warning, therefore, fwid reports upon its completion the number of broken words, if that number is positive, to the standard error stream (normally the console) along with the width. The width is reported in these broken word mes- sages for the benefit of those using more than one instance of fwid in a pipeline. The notion of _w_i_d_t_h of a line ignores standard escape sequences that begin either with the character pair "[" or with the single character with hex value 9B and that end with the next following "letter" character (more precisely, the next following character in the hex range 40-7f). Char- acters in the "control" ranges (hex 00-1f and 80-9f) are likewise ignored in width computation except that "back- space" characters are counted with value -1 and "tab" char- acters are counted with value +3. BUGS Please report bugs, problems or comments to W. F. Hammond at SunOS 5.5.1 Last change: 19 Aug 1997 1 FWID(1) User Commands FWID(1) the email address "hammond@csc.albany.edu". SEE ALSO _w_c_w(1) SunOS 5.5.1 Last change: 19 Aug 1997 2