<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>7727</bug_id>
          
          <creation_ts>2005-08-21 20:51:45 +0400</creation_ts>
          <short_desc>man-page mistake</short_desc>
          <delta_ts>2005-12-31 02:26:43 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>bash</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>NOTABUG</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexey Gladkov">legion</reporter>
          <assigned_to name="placeholder@altlinux.org">placeholder</assigned_to>
          <cc>at</cc>
    
    <cc>glebfm</cc>
    
    <cc>ldv</cc>
    
    <cc>placeholder</cc>
    
    <cc>vt</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>28938</commentid>
    <comment_count>0</comment_count>
    <who name="Alexey Gladkov">legion</who>
    <bug_when>2005-08-21 20:51:45 +0400</bug_when>
    <thetext>In man-page contains the wrong information:

...
string1 &lt; string2
       True  if  string1  sorts before string2 lexicographically in the
       current locale.
string1 &gt; string2
       True if string1 sorts after  string2  lexicographically  in  the
       current locale.
...

Constructions &quot;&lt;&quot; and &quot;&gt;&quot; is illegal.

[legion@legion testdir]$ ls -l
total 4
-rwxr-xr-x  1 legion legion 134 Aug 21 19:32 test.sh
[legion@legion testdir]$ cat ./test.sh 
#!/bin/zsh

export LC_ALL=C LANG=C LANGUAGE=C

if [ &quot;a&quot; &lt; &quot;b&quot; ]; then
    echo &quot;a &lt; b&quot;
fi

if [ &quot;a&quot; &gt; &quot;b&quot; ]; then
    echo &quot;a &gt; b&quot;
fi
[legion@legion testdir]$ ./test.sh 
./test.sh:5: no such file or directory: b
a &gt; b
[legion@legion testdir]$ ls -l
total 4
-rw-r--r--  1 legion legion   0 Aug 21 20:12 b
-rwxr-xr-x  1 legion legion 134 Aug 21 19:32 test.sh
[legion@legion testdir]$

Bash consider &quot;&gt;&quot; and &quot;&lt;&quot; operations at the &quot;[...]&quot; constructions as
redirections. This operations don&apos;t work in zsh, ash too, but are described in
their man-pages.

What suggestions?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>34339</commentid>
    <comment_count>1</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2005-12-31 02:26:43 +0300</bug_when>
    <thetext>You just should not forget to quote &lt; and &gt; characters, e.g.

$ if [ a \&lt; b ]; then echo lt; fi
lt
</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>