Note: Tips for new AWK users.
# text2html # # This AWK script converts a text file to html so that the text can be # included in an html page. In particular, it converts special HTML # characters so that they can be displayed as they should. This # script does not do any syntax highlighting (unlike java2html # programs), but it does support a few useful options as described in # the usage below: # # Usage: text2html.awk [numeric=1] [nbsp=1] [url=1] [header=1|title=<title>] <file> # # nbsp ---- Indiates that non-breaking spaces should be converted # to . If nbsp is set, spaces are converted to # tabs are converted to 	 and a line break <br> is # added to each line. # # url ---- Indicates that URLs should be converted to hyperlinks. # Following URL protocols are recognized, as defined by # RFC 1738. # http:// https:// mailto: ftp:// news: telnet:// gopher:// # nntp:// wais:// prospero:// # www. has been added to the list in conformance with most # e-mail client software behavior. # # header ---- Indicates that HTML header should be generated for the file. # If a title is specified, header is implied. If header is # specified and title is not, the filename is used as the # title. # # title ---- Indicates that an HTML header should be generated for the file, # using the specified title. # numeric ---- Indicates that HTML numeric entities should not # be converted. By default, HTML numeric entities, # represented as &#nnn; are html-converted, so that # they will look like &#nnn; in the HTML representation, # rather than the HTML character they represent. For example, # ')' in the text file will look ')' in the # result of text2html by default, and as 'A' if numeric # is specified. #