<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://unkrig.de/w/index.php?action=history&amp;feed=atom&amp;title=CommandLineOptions_tutorial</id>
	<title>CommandLineOptions tutorial - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://unkrig.de/w/index.php?action=history&amp;feed=atom&amp;title=CommandLineOptions_tutorial"/>
	<link rel="alternate" type="text/html" href="https://unkrig.de/w/index.php?title=CommandLineOptions_tutorial&amp;action=history"/>
	<updated>2026-04-27T12:26:19Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://unkrig.de/w/index.php?title=CommandLineOptions_tutorial&amp;diff=42&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;===Processing command line options is easy, so why do I need a helper?===  To illustrate the reason being, let&#039;s develop a command line application to show the typical problems and how &lt;code&gt;CommandLineOptions&lt;/code&gt; can help you:  &lt;pre&gt; package com.acme.clo_demo;  public class Diff {      public static void main(String[] args) {          boolean brief                = false;         boolean reportIdenticalFiles = false;         int     context              = 3;...&quot;</title>
		<link rel="alternate" type="text/html" href="https://unkrig.de/w/index.php?title=CommandLineOptions_tutorial&amp;diff=42&amp;oldid=prev"/>
		<updated>2024-05-01T20:50:22Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;===Processing command line options is easy, so why do I need a helper?===  To illustrate the reason being, let&amp;#039;s develop a command line application to show the typical problems and how &amp;lt;code&amp;gt;CommandLineOptions&amp;lt;/code&amp;gt; can help you:  &amp;lt;pre&amp;gt; package com.acme.clo_demo;  public class Diff {      public static void main(String[] args) {          boolean brief                = false;         boolean reportIdenticalFiles = false;         int     context              = 3;...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;===Processing command line options is easy, so why do I need a helper?===&lt;br /&gt;
&lt;br /&gt;
To illustrate the reason being, let&amp;#039;s develop a command line application to show the typical problems and how &amp;lt;code&amp;gt;CommandLineOptions&amp;lt;/code&amp;gt; can help you:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
package com.acme.clo_demo;&lt;br /&gt;
&lt;br /&gt;
public class Diff {&lt;br /&gt;
&lt;br /&gt;
    public static void main(String[] args) {&lt;br /&gt;
&lt;br /&gt;
        boolean brief                = false;&lt;br /&gt;
        boolean reportIdenticalFiles = false;&lt;br /&gt;
        int     context              = 3;&lt;br /&gt;
&lt;br /&gt;
        int idx = 0;&lt;br /&gt;
        while (idx &amp;lt; args.length) {&lt;br /&gt;
            String arg = args[idx];&lt;br /&gt;
            if (!arg.startsWith(&amp;quot;-&amp;quot;)) break;&lt;br /&gt;
            idx++;&lt;br /&gt;
            if (&amp;quot;-q&amp;quot;.equals(arg) || &amp;quot;--brief&amp;quot;.equals(arg)) {&lt;br /&gt;
                brief = true;&lt;br /&gt;
            } else&lt;br /&gt;
            if (&amp;quot;-s&amp;quot;.equals(arg) || &amp;quot;--report-identical-files&amp;quot;.equals(arg)) {&lt;br /&gt;
                reportIdenticalFiles = true;&lt;br /&gt;
            } else&lt;br /&gt;
            if (&amp;quot;-C&amp;quot;.equals(arg) || &amp;quot;--Context&amp;quot;.equals(arg)) {&lt;br /&gt;
                context = Integer.parseInt(args[idx++]);&lt;br /&gt;
            } else&lt;br /&gt;
            {&lt;br /&gt;
                System.err.println(&amp;quot;Unrecognized command line option \&amp;quot;&amp;quot; + arg + &amp;quot;\&amp;quot;&amp;quot;);&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // Now process args[idx]... and do the &amp;quot;real work&amp;quot;.&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This implementation supports both &amp;quot;short&amp;quot; and &amp;quot;long&amp;quot; options, and detects invalid options. However there is room for improvement:&lt;br /&gt;
* You cannot have &amp;quot;compact&amp;quot; short options, e.g. &amp;quot;&amp;lt;tt&amp;gt;-qs&amp;lt;/tt&amp;gt;&amp;quot; for &amp;quot;&amp;lt;tt&amp;gt;-q -s&amp;lt;/tt&amp;gt;&amp;quot;.&lt;br /&gt;
* You get an &amp;lt;code&amp;gt;ArrayIndexOutOfBoundsException&amp;lt;/code&amp;gt; when &amp;quot;&amp;lt;tt&amp;gt;-C&amp;lt;/tt&amp;gt;&amp;quot; is not followed by an argument.&lt;br /&gt;
* You get a &amp;lt;code&amp;gt;NumberFormatException&amp;lt;/code&amp;gt; when the argument of &amp;quot;&amp;lt;tt&amp;gt;-C&amp;lt;/tt&amp;gt;&amp;quot; cannot be converted to an integer.&lt;br /&gt;
* If the first argument after the options starts with a hyphen, it is identified as an invalid option.&lt;br /&gt;
* The code is not documented.&lt;br /&gt;
* The only support the user gets when it uses the tool is the &amp;quot;Unsupported command line option...&amp;quot; error message.&lt;br /&gt;
&lt;br /&gt;
So here&amp;#039;s the second version that overcomes these deficits:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
package com.acme.clo_demo;&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * A (rudimentary) re-implementation of the well-known DIFF command line utility.&lt;br /&gt;
 */&lt;br /&gt;
public class Diff {&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Parses the command line options and arguments, then prints the differences between two files or two&lt;br /&gt;
     * directories.&lt;br /&gt;
     * &amp;lt;p&amp;gt;&lt;br /&gt;
     *   Supports the following command line options:&lt;br /&gt;
     * &amp;lt;/p&amp;gt;&lt;br /&gt;
     * &amp;lt;dl&amp;gt;&lt;br /&gt;
     *   &amp;lt;dt&amp;gt;--help&amp;lt;/dt&amp;gt;&lt;br /&gt;
     *   &amp;lt;dd&amp;gt;Print usage help and exit&amp;lt;/dd&amp;gt;&lt;br /&gt;
     *   &amp;lt;dt&amp;gt;-q, --brief&amp;lt;/dt&amp;gt;&lt;br /&gt;
     *   &amp;lt;dd&amp;gt;Don&amp;#039;t report the differences, only which files have changed&amp;lt;/dd&amp;gt;&lt;br /&gt;
     *   &amp;lt;dt&amp;gt;-s, --report-identical-files&amp;lt;/dt&amp;gt;&lt;br /&gt;
     *   &amp;lt;dd&amp;gt;Also report about files that did NOT change&amp;lt;/dd&amp;gt;&lt;br /&gt;
     *   &amp;lt;dt&amp;gt;-C &amp;lt;var&amp;gt;NUM&amp;lt;/var&amp;gt;, --context &amp;lt;var&amp;gt;NUM&amp;lt;/var&amp;gt;&amp;lt;/dt&amp;gt;&lt;br /&gt;
     *   &amp;lt;dd&amp;gt;Report differences in &amp;quot;context diff&amp;quot; format, with &amp;lt;var&amp;gt;NUM&amp;lt;/var&amp;gt; lines of context&amp;lt;/dd&amp;gt;&lt;br /&gt;
     * &amp;lt;/dl&amp;gt;&lt;br /&gt;
     */&lt;br /&gt;
    public static void main(String[] args) {&lt;br /&gt;
&lt;br /&gt;
        boolean brief                = false;&lt;br /&gt;
        boolean reportIdenticalFiles = false;&lt;br /&gt;
        int     context              = 3;&lt;br /&gt;
&lt;br /&gt;
        int idx = 0;&lt;br /&gt;
        while (idx &amp;lt; args.length) {&lt;br /&gt;
&lt;br /&gt;
            String arg = args[idx];&lt;br /&gt;
&lt;br /&gt;
            if (!arg.startsWith(&amp;quot;-&amp;quot;)) break;&lt;br /&gt;
&lt;br /&gt;
            idx++;&lt;br /&gt;
&lt;br /&gt;
            if (&amp;quot;--&amp;quot;.equals(arg)) {&lt;br /&gt;
                break;&lt;br /&gt;
            } else&lt;br /&gt;
            if (&amp;quot;--help&amp;quot;.equals(arg)) {&lt;br /&gt;
                System.out.println(&amp;quot;Prints the differences between files.&amp;quot;);&lt;br /&gt;
                System.out.println();&lt;br /&gt;
                System.out.println(&amp;quot;Usage:&amp;quot;);&lt;br /&gt;
                System.out.println(&amp;quot;  diff [ &amp;lt;option&amp;gt; ] ... &amp;lt;file1&amp;gt; &amp;lt;file2&amp;gt;&amp;quot;);&lt;br /&gt;
                System.out.println(&amp;quot;      Prints the differences between &amp;lt;file1&amp;gt; and &amp;lt;file2&amp;gt;.&amp;quot;);&lt;br /&gt;
                System.out.println(&amp;quot;  diff [ &amp;lt;option&amp;gt; ] ... &amp;lt;dir1&amp;gt; &amp;lt;dir2&amp;gt;&amp;quot;);&lt;br /&gt;
                System.out.println(&amp;quot;      Prints the differences between the files under &amp;lt;dir1&amp;gt; and &amp;lt;dir2&amp;gt;.&amp;quot;);&lt;br /&gt;
                System.out.println();&lt;br /&gt;
                System.out.println(&amp;quot;Supports the following command line options:&amp;quot;);&lt;br /&gt;
                System.out.println(&amp;quot;  --help&amp;lt;/dt&amp;gt;&amp;quot;);&lt;br /&gt;
                System.out.println(&amp;quot;      Print usage help and exit&amp;quot;);&lt;br /&gt;
                System.out.println(&amp;quot;  -q, --brief&amp;quot;);&lt;br /&gt;
                System.out.println(&amp;quot;      Don&amp;#039;t report the differences, only which files have changed&amp;quot;);&lt;br /&gt;
                System.out.println(&amp;quot;  -s, --report-identical-files&amp;quot;);&lt;br /&gt;
                System.out.println(&amp;quot;      Also report about files that did NOT change&amp;quot;);&lt;br /&gt;
                System.out.println(&amp;quot;  -C &amp;lt;NUM&amp;gt;, --context &amp;lt;NUM&amp;gt;&amp;quot;);&lt;br /&gt;
                System.out.println(&amp;quot;      Report differences in \&amp;quot;context diff\&amp;quot; format, with &amp;lt;NUM&amp;gt; lines of&amp;quot;);&lt;br /&gt;
                System.out.println(&amp;quot;      context&amp;quot;);&lt;br /&gt;
                System.exit(0);&lt;br /&gt;
            } else&lt;br /&gt;
            if (&amp;quot;-q&amp;quot;.equals(arg) || &amp;quot;--brief&amp;quot;.equals(arg)) {&lt;br /&gt;
                brief = true;&lt;br /&gt;
            } else&lt;br /&gt;
            if (&amp;quot;-s&amp;quot;.equals(arg) || &amp;quot;--report-identical-files&amp;quot;.equals(arg)) {&lt;br /&gt;
                reportIdenticalFiles = true;&lt;br /&gt;
            } else&lt;br /&gt;
            if (&amp;quot;-C&amp;quot;.equals(arg) || &amp;quot;--Context&amp;quot;.equals(arg)) {&lt;br /&gt;
                if (idx == args.length) {&lt;br /&gt;
                    System.err.println(&amp;quot;Count missing after \&amp;quot;-C\&amp;quot; or \&amp;quot;--context\&amp;quot;.&amp;quot;);&lt;br /&gt;
                    System.exit(1);&lt;br /&gt;
                }&lt;br /&gt;
                try {&lt;br /&gt;
                   context = Integer.parseInt(args[idx++]);&lt;br /&gt;
               } catch (NumberFormatException nfe) {&lt;br /&gt;
                   System.err.println(&amp;quot;Cannot convert \&amp;quot;&amp;quot; + args[idx - 1] + &amp;quot;\&amp;quot; to an integer&amp;quot;);&lt;br /&gt;
                   System.exit(1);&lt;br /&gt;
               }&lt;br /&gt;
            } else&lt;br /&gt;
            {&lt;br /&gt;
                System.err.println(&amp;quot;Unrecognized command line option \&amp;quot;&amp;quot; + arg + &amp;quot;\&amp;quot;; try \&amp;quot;--help\&amp;quot;.&amp;quot;);&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
        // Now process args[idx]... and do the &amp;quot;real work&amp;quot;.&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Well, that&amp;#039;s a lot of boilerplate code! And it&amp;#039;s just this trivial example...&lt;br /&gt;
&lt;br /&gt;
Also, people may want to read about the tool without installing or running it, so you fire up the word processor, or the HTML editor, or the Wiki...&lt;br /&gt;
&lt;br /&gt;
But after all, you have written and documented a professional command line tool, congratulations!&lt;br /&gt;
&lt;br /&gt;
But wait, now there is number of &amp;#039;&amp;#039;new&amp;#039;&amp;#039; problems:&lt;br /&gt;
* The code for processing the command line options is &amp;#039;&amp;#039;huge&amp;#039;&amp;#039;, and most of it deals with trivial error conditions.&lt;br /&gt;
* There is a lot of redundancy in the command line options: There&amp;#039;s the CLO &amp;#039;&amp;#039;implementation&amp;#039;&amp;#039;, and the &amp;#039;&amp;#039;description&amp;#039;&amp;#039; appears in three places: The JAVADOC of the &amp;lt;code&amp;gt;main()&amp;lt;/code&amp;gt; method, the &amp;lt;code&amp;gt;System.out.println()&amp;lt;/code&amp;gt; for the &amp;quot;&amp;lt;tt&amp;gt;--help&amp;lt;/tt&amp;gt;&amp;quot; option, and in the online/paper documentation.&lt;br /&gt;
&lt;br /&gt;
What a maintenance nightmare!&lt;br /&gt;
&lt;br /&gt;
==So how can &amp;lt;code&amp;gt;CommandLineOptions&amp;lt;/code&amp;gt; help?==&lt;br /&gt;
&lt;br /&gt;
Here&amp;#039;s how it works:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;First&amp;#039;&amp;#039;&amp;#039;, you replace the command line option parsing with a call to [http://commons.unkrig.de/javadoc/de/unkrig/commons/util/CommandLineOptions.html#parse-java.lang.String:A-java.lang.Object- CommandLineOptions.parse()]. Also add a method for each command line option, annotate it with [http://commons.unkrig.de/javadoc/de/unkrig/commons/util/annotation/CommandLineOption.html @CommandLineOption] and add its description as JAVADOC. Put the usage text into the JAVADOC comment of the &amp;quot;&amp;lt;code&amp;gt;main()&amp;lt;/code&amp;gt;&amp;quot; method, with a placeholder &amp;quot;&amp;lt;tt&amp;gt;{@command-line-options}&amp;lt;/tt&amp;gt; for the descriptions of the command line options.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Second&amp;#039;&amp;#039;&amp;#039;, you generate HTML documentation with the [[Doclet#The_MAIN_Doclet|MAIN doclet]]:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;javadoc doclet=&amp;quot;de.unkrig.doclet.main.MainDoclet&amp;quot; docletpath=&amp;quot;de.unkrig.doclet.main.jar&amp;quot; destdir=&amp;quot;src&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fileset file=&amp;quot;src/com/acme/clo_demo/Diff.java&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;/javadoc&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Third&amp;#039;&amp;#039;&amp;#039;, you convert the HTML documentation into plain text with the [http://html2txt.unkrig.de HTML2TXT] utility:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;taskdef classpath=&amp;quot;html2txt.jar&amp;quot; resource=&amp;quot;de/unkrig/html2txt/antlib.xml&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;html2txt&amp;gt;&lt;br /&gt;
     &amp;lt;fileset dir=&amp;quot;src&amp;quot; includes=&amp;quot;com/acme/clo_demo/Diff.main(String[]).html&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;/html2txt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Fourth&amp;#039;&amp;#039;&amp;#039;, rewrite the &amp;quot;&amp;lt;tt&amp;gt;--help&amp;lt;/tt&amp;gt;&amp;quot; option to simply copy the plain text documentation to &amp;lt;code&amp;gt;System.out&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==So here&amp;#039;s the code==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
package com.acme.clo_demo;&lt;br /&gt;
&lt;br /&gt;
import java.io.IOException;&lt;br /&gt;
import java.io.InputStream;&lt;br /&gt;
import java.io.InputStreamReader;&lt;br /&gt;
import java.io.OutputStreamWriter;&lt;br /&gt;
import java.io.Writer;&lt;br /&gt;
import java.util.regex.Pattern;&lt;br /&gt;
&lt;br /&gt;
import de.unkrig.commons.text.pattern.PatternUtil;&lt;br /&gt;
import de.unkrig.commons.util.CommandLineOptions;&lt;br /&gt;
import de.unkrig.commons.util.annotation.CommandLineOption;&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * A (rudimentary) re-implementation of the well-known DIFF command line utility.&lt;br /&gt;
 */&lt;br /&gt;
public class Diff {&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Prints the differences between files.&lt;br /&gt;
     * &amp;lt;h2&amp;gt;Usage:&amp;lt;/h2&amp;gt;&lt;br /&gt;
     * &amp;lt;dl&amp;gt;&lt;br /&gt;
     *   &amp;lt;dt&amp;gt;diff [ &amp;lt;var&amp;gt;option&amp;lt;/var&amp;gt; ] ... &amp;lt;var&amp;gt;file1&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;file2&amp;lt;/var&amp;gt;&amp;lt;/dt&amp;gt;&lt;br /&gt;
     *   &amp;lt;dd&amp;gt;Prints the differences between &amp;lt;var&amp;gt;file1&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;file2&amp;lt;/var&amp;gt;.&amp;lt;/dd&amp;gt;&lt;br /&gt;
     *   &amp;lt;dt&amp;gt;diff [ &amp;lt;var&amp;gt;option&amp;lt;/var&amp;gt; ] ... &amp;lt;var&amp;gt;dir1&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;dir2&amp;lt;/var&amp;gt;&amp;lt;/dt&amp;gt;&lt;br /&gt;
     *   &amp;lt;dd&amp;gt;Prints the differences between the files under &amp;lt;var&amp;gt;dir1&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;dir2&amp;lt;/var&amp;gt;.&amp;lt;/dd&amp;gt;&lt;br /&gt;
     * &amp;lt;/dl&amp;gt;&lt;br /&gt;
     * &amp;lt;h2&amp;gt;Options:&amp;lt;/h2&amp;gt;&lt;br /&gt;
     * {@command-line-options}&lt;br /&gt;
     */&lt;br /&gt;
    public static void main(String[] args) {&lt;br /&gt;
&lt;br /&gt;
        Diff diff = new Diff();&lt;br /&gt;
&lt;br /&gt;
        args = CommandLineOptions.parse(args, diff);&lt;br /&gt;
&lt;br /&gt;
        // Now process args[idx]... and do the &amp;quot;real work&amp;quot;.&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    private boolean brief                = false;&lt;br /&gt;
    private boolean reportIdenticalFiles = false;&lt;br /&gt;
    private int     context              = 3;&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Print usage help and exit.&lt;br /&gt;
     */&lt;br /&gt;
    @CommandLineOption public void&lt;br /&gt;
    help() throws IOException {&lt;br /&gt;
        CommandLineOptions.printResource(Diff.class, &amp;quot;main(String[]).txt&amp;quot;, null, System.out);&lt;br /&gt;
        System.exit(0);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Don&amp;#039;t report the differences, only which files have changed.&lt;br /&gt;
     */&lt;br /&gt;
    @CommandLineOption(name = { &amp;quot;-q&amp;quot;, &amp;quot;--brief&amp;quot; }) public void&lt;br /&gt;
    setBrief() { this.brief = true; }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Also report about files that did NOT change.&lt;br /&gt;
     */&lt;br /&gt;
    @CommandLineOption(name = { &amp;quot;-s&amp;quot;, &amp;quot;--report-identical-files&amp;quot;}) public void&lt;br /&gt;
    setReportIdenticalFiles() { this.reportIdenticalFiles = true; }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Report differences in &amp;quot;context diff&amp;quot; format, with &amp;lt;var&amp;gt;number-of-lines&amp;lt;/var&amp;gt; lines of context.&lt;br /&gt;
     */&lt;br /&gt;
    @CommandLineOption(name = { &amp;quot;-C&amp;quot;, &amp;quot;--Context&amp;quot; }) public void&lt;br /&gt;
    setContext(int numberOfLines) { this.context = numberOfLines; }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you run it with the &amp;quot;&amp;lt;tt&amp;gt;--help&amp;lt;/tt&amp;gt;&amp;quot; option, you get:&lt;br /&gt;
&lt;br /&gt;
 Prints the differences between files.&lt;br /&gt;
 &lt;br /&gt;
 Usage:&lt;br /&gt;
 ======&lt;br /&gt;
 &lt;br /&gt;
   diff [ &amp;lt;option&amp;gt; ] ... &amp;lt;file1&amp;gt; &amp;lt;file2&amp;gt;&lt;br /&gt;
       Prints the differences between &amp;lt;file1&amp;gt; and &amp;lt;file2&amp;gt;.&lt;br /&gt;
   diff [ &amp;lt;option&amp;gt; ] ... &amp;lt;dir1&amp;gt; &amp;lt;dir2&amp;gt;&lt;br /&gt;
       Prints the differences between the files under &amp;lt;dir1&amp;gt; and &amp;lt;dir2&amp;gt;.&lt;br /&gt;
 &lt;br /&gt;
 Options:&lt;br /&gt;
 ========&lt;br /&gt;
 &lt;br /&gt;
 --help&lt;br /&gt;
     Print usage help and exit.&lt;br /&gt;
 -q&lt;br /&gt;
 --brief&lt;br /&gt;
     Don&amp;#039;t report the differences, only which files have changed.&lt;br /&gt;
 -s&lt;br /&gt;
 --report-identical-files&lt;br /&gt;
     Also report about files that did NOT change.&lt;br /&gt;
 -C &amp;lt;number-of-lines&amp;gt;&lt;br /&gt;
 --context &amp;lt;number-of-lines&amp;gt;&lt;br /&gt;
     Report differences in &amp;quot;context diff&amp;quot; format, with &amp;lt;number-of-lines&amp;gt; lines&lt;br /&gt;
     of context.&lt;br /&gt;
&lt;br /&gt;
And voila - you have zero redundancy, and HTML documentation for printing and/or online presentation for free!&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>