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

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

    <bug>
          <bug_id>10170</bug_id>
          
          <creation_ts>2006-10-20 18:29:39 +0400</creation_ts>
          <short_desc>/usr/bin/[ works like &apos;test&apos;, not like &apos;[&apos;</short_desc>
          <delta_ts>2009-01-06 00:18:16 +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>coreutils</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</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="Sergey Vlasov">vsu</reporter>
          <assigned_to name="placeholder@altlinux.org">placeholder</assigned_to>
          <cc>glebfm</cc>
    
    <cc>ldv</cc>
    
    <cc>mike</cc>
    
    <cc>placeholder</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>41557</commentid>
    <comment_count>0</comment_count>
    <who name="Sergey Vlasov">vsu</who>
    <bug_when>2006-10-20 18:29:39 +0400</bug_when>
    <thetext>В настоящий момент /usr/bin/[ - это симлинк на /usr/bin/test. Однако фактически
test из coreutils не меняет своё поведение в зависимости от argv[0], в
результате &apos;[&apos; не работает так, как нужно:

$ command [ -n xxx ]
[: xxx: ожидается бинарный оператор

$ command [ a = a ] 
[: излишний аргумент `]&apos;%

(тут к тому же в конце сообщения отсутствует \n).

Проблема наблюдается как в свежем coreutils-5.97-alt1, так и в старых версиях (в
частности, в coreutils-5.2.1-alt5 из M2.4). Правда, чаще всего она не
проявляется, поскольку большая часть версий shell используют встроенный &apos;[&apos;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69303</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Shigorin">mike</who>
    <bug_when>2008-05-04 20:41:39 +0400</bug_when>
    <thetext>$ bash
$ command [ -n xxx ]
$ command [ a = a ]
$ /usr/bin/[ a = a ] 
/usr/bin/[: extra argument `]&apos;
$ rpm -q coreutils
coreutils-6.11-alt1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83914</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Shigorin">mike</who>
    <bug_when>2009-01-06 00:18:15 +0300</bug_when>
    <thetext>&gt; bash
$ command [ a = a ]
$ command [ -n xxx ]
$ rpm -q coreutils
coreutils-6.12-alt2
</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>