%% options copyright owner = Dirk Krause copyright year = 2011-2014 license = bsd %% module #include "dk3all.h" #include "dkt.h" $!trace-include /** Default help text for dkt. */ static dkChar const * const dkt_help_text[] = { $!text file=dkt3.txt,macro=dkT NAME dkt - Dirk Krause's tool SYNOPSIS dkt DESCRIPTION The dkt program is a multipurpose tool. The command chooses the function to perform. For some commands with long names there are abbreviations available. The following commands can be used: sort sorts input line by line, different sort criteria can be used. html ht converts input to HTML. latex lat converts input to LaTeX. cat write input to standard output with optional conversion. pwd shows the current working directory. ls shows informations about the specified files. checksum cs creates checksums and compares current checksums against given lists. checksize creates a file size list and compares current file sizes against a given list. blocksize blks buffers an input stream and writes a data chunk sequence of fixed size chunks. hexadecimal hex shows file contents in hexadecimal notation. octal oct shows file contents in octal notation. tape-set ts chooses the next tape set for backup or confirms the current tape set. tape chooses the next tape from the current set for backup or confirms the current tape set. create-password crp suggests a password. uid searches for the first free user ID in a range. erase-disk ed creates a data stream to wipe a hard disk. random rnd creates random data. Use dkt help to obtained detailed information for a command, i.e. dkt help ls for the ls command. OPTIONS The options depend on the command choosen, options are documented in the help for the commands. RETURN VALUE The program returns exit status code 0 on success, all other status codes indicate an error. AUTHOR Dirk Krause COPYRIGHT AND LICENSE Run dkt --license-terms to see the license conditions. SEE ALSO http://dktools.sourceforge.net $!end }; /** Default help text for dkt sort. */ static dkChar const * const dkt_sort_help_text[] = { $!text file=dkt3sort.txt,macro=dkT NAME dkt sort - Sort input line by line. SYNOPSIS dkt sort [] [] DESCRIPTION The program sorts input data line by line. Different sort criteria can be used: - Case-sensitive text sorting, - Case-insensitive text sorting. - Sorting by leading numbers in a line (signed and unsigned integers or floating point numbers. OPTIONS -R skips all settings from dkt.conf configuration files. -i encoding sets up the default input encoding. This encoding is used if no byte order marker is found at the beginning of input. -p shortcut for "-i ascii". -c sets up case-insensitive text comparison. -b ignores leading whitespaces (spaces and tabulators) at the beginning of lines. -w uses a whitespace-normalized version of each line for comparison. Leading and trailing whitespace sequences are removed, all other whitespace sequences are replaced by one space. -n sets up comparison by leading signed integers at the beginning of lines. -u sets up comparison by leading unsigned integers at the beginning of lines. -f sets up comparison by leading floating point numbers at the beginning of lines. -s prints lines without a leading number before the lines with a number (when -n, -u or -f is used). By default lines without a number are printed after lines with numbers. -m merges lines evaluated as equally in comparisons. -e merges lines exactly equal. -r uses reverse sort order. RETURN VALUE The program returns 0 on success, any other value indicates an error. AUTHOR Dirk Krause HISTORY The "dkt sort" command replaces the program ksort from former dktools versions. $!end }; /** Default help text for dkt html. */ static dkChar const * const dkt_html_help_text[] = { $!text file=dkt3html.txt,macro=dkT NAME dkt html - Convert text to HTML SYNOPSIS dkt html [] [] DESCRIPTION The program converts input data to HTML. OPTIONS -R skips all settings from dkt.conf configuration files. -i encoding sets up the default input encoding. This encoding is used if no byte order marker is found at the beginning of input. -p shortcut for "-i ascii". -l add tags containing line number (max. 999 lines). -f creates a full HTML file. -t title specifies the title for a full HTML file. -e sets echo mode, the command line arguments are the input text to process. RETURN VALUE The program returns 0 on success, any other value indicates an error. AUTHOR Dirk Krause HISTORY The "dkt html" function replaces the text2htm program from previous dktools versions. $!end }; /** Default help text for dkt latex. */ static dkChar const * const dkt_latex_help_text[] = { $!text file=dkt3lat.txt,macro=dkT NAME dkt latex - Convert text to LaTeX SYNOPSIS dkt latex [] [] DESCRIPTION The program converts input text to LaTeX. OPTIONS -R skips all settings from dkt.conf configuration files. -i encoding sets up the default input encoding. This encoding is used if no byte order marker is found at the beginning of input. -p shortcut for "-i ascii". -e Echo mode, the command line arguments are the text to convert. -x Hexadecimal mode, command line arguments are hexadecimal representations of the characters to convert. RETURN VALUE The program returns 0 on success, any other value indicates an error. AUTHOR Dirk Krause HISTORY The "dkt latex" function replaces the text2lat and echo2lat programs from previous dktools versions. $!end }; /** Default help text for dkt cat. */ static dkChar const * const dkt_cat_help_text[] = { $!text file=dkt3cat.txt,macro=dkT NAME dkt cat - Show files, change encoding if required SYNOPSIS dkt cat [] [] DESCRIPTION The program shows files, normally the sytems default encoding is used for output. OPTIONS -R skips all settings from dkt.conf configuration files. -i encoding sets up the default input encoding. This encoding is used if no byte order marker is found at the beginning of input. -p shortcut for "-i ascii". -o encoding chooses an output encoding. -c writes carriage return + newline combination at line ends. Normally (without the -c option) only a newline is written. -w normalizes text. Leading and trailing whitespace sequences are removed, all other whitespace sequences are replaced by one space. RETURN VALUE The program returns 0 on success, any other value indicates an error. AUTHOR Dirk Krause $!end }; /** Default help text for dkt pwd. */ static dkChar const * const dkt_pwd_help_text[] = { $!text file=dkt3pwd.txt,macro=dkT NAME dkt pwd - Print working directory SYNOPSIS dkt pwd