COMMANDS2HTML

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
EXIT STATUS
FILES
EXAMPLES
AUTHOR
REPORTING BUGS
COPYRIGHT

NAME

commands2html − simple command interpreter that outputs HTML

SYNOPSIS

commands2html [OPTION..] FILE [OPTION..]

DESCRIPTION

Execute the commands listed in given .commands file and output to a .html_snippet file, in a format that appears that the commands were run at a sh prompt.

The commands are executed with the current directory set to the directory containing the input .commands file.

The generated HTML snippet is a PRE block, intended for inclusion in an HTML page. Use of the options can output other bits of relevant HTML.

The generated .html_snippet (or .html, depending on options used) file is overwritten if it already exists.

FILE

input file listing the commands to be executed.

OPTIONS

−V, −−version

show version

−−head

output (to stdout) the suggested snippet for within <head>

−−css

output (to stdout) the suggested snippet for within an included CSS file

−−fullpage

write a full .html page (instead of .html_snippet)

EXIT STATUS

0

if OK,

1

when errors are encountered.

FILES

None but that given on the command line and the same but with either .html or .html_snippet appended.

EXAMPLES

Run the commands listed in myscript.commands (output is written to myscript.commands.html_snippet):

commands2html myscript.commands

Run the commands listed in all .commands files below the current directory, writing the results out as full html pages ready for viewing in a web browser (each output is written to FILE.html):

find . -name ’*.commands’ -type f -exec commands2html --fullpage ’{}’ ’;’

AUTHOR

Written by Anthony Doggett <mcm@interfaces.org.uk>

REPORTING BUGS

Please email the author at the above address, preferably with sufficient information to reproduce the bug.

COPYRIGHT

Copyright (c) 2015-2017 Anthony Doggett

<http://interfaces.org.uk/mcm>