Print this page
8858 /usr/bin/grep doesn't support -E option
4580 /usr/bin/grep can't handle multibyte characters
8929 8868 tests are not delivered with system/test/utiltest
8860 Example in grep(1) is incorrect
Reviewed by: Peter Tribble <peter.tribble@gmail.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Yuri Pankov <yuripv@gmx.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libshell/misc/shell_styleguide.docbook
          +++ new/usr/src/lib/libshell/misc/shell_styleguide.docbook
↓ open down ↓ 344 lines elided ↑ open up ↑
 345  345        <section xml:id="use_dashdash_if_first_arg_is_variable">
 346  346            <title>If the first operand of a command is a variable, use <literal>--</literal></title>
 347  347            <para>If the first operand of a command is a variable, use <literal>--</literal>
 348  348            for any command that accepts this as end of argument to
 349  349            avoid problems if the variable expands to a value starting with <literal>-</literal>.
 350  350            </para>
 351  351            <note><para>
 352  352            At least
 353  353            <simplelist type="inline">
 354  354                <member>print</member>
 355      -              <member>/usr/bin/fgrep</member><member>/usr/xpg4/bin/fgrep</member>
 356      -              <member>/usr/bin/grep</member> <member>/usr/xpg4/bin/grep</member>
 357      -              <member>/usr/bin/egrep</member><member>/usr/xpg4/bin/egrep</member>
      355 +              <member>/usr/bin/fgrep</member>
      356 +              <member>/usr/bin/grep</member>
      357 +              <member>/usr/bin/egrep</member>
 358  358            </simplelist>
 359  359            support <literal>--</literal> as "end of arguments"-terminator.
 360  360            </para></note>
 361  361        </section>
 362  362  
 363  363        <section xml:id="use_export">
 364  364            <title>&tag_kshonly;&tag_performance;Use <literal>$ export FOOBAR=val #</literal> instead of
 365  365            <literal>$ FOOBAR=val ; export FOOBAR #</literal></title>
 366  366            <para>Use <literal>$ export FOOBAR=val # instead of $ FOOBAR=val ; export FOOBAR #</literal> -
 367  367            this is much faster.</para>
↓ open down ↓ 1097 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX