emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-bug-tracker] bug#9211: closed (test -l)


From: GNU bug Tracking System
Subject: [Emacs-bug-tracker] bug#9211: closed (test -l)
Date: Mon, 01 Aug 2011 00:23:02 +0000

Your message dated Sun, 31 Jul 2011 18:22:11 -0600
with message-id <address@hidden>
and subject line Re: bug#9211: test -l
has caused the GNU bug report #9211,
regarding test -l
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
9211: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9211
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: test -l Date: Sun, 31 Jul 2011 10:07:36 -0400 User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110616 SUSE/3.1.11 NOT Firefox/3.5 Lightning/1.0b2 Thunderbird/3.1.11
Hi,

In the test manual for the 'test' command, it states that:
"INTEGER may also be -l STRING, which evaluates to the length of STRING"
and even in the info page it gives an example of:

test -l abc -gt 1 && echo yes

but that command, as well as any in scripts, reports an error of:

bash: test: -l: unary operator expected

This has been the case since as far back as least the summer of 2009 when after I shortly started using a Linux Operating System - that was PCLinuxOS back then, but now I am using openSUSE in the past year (currently version 11.4 KDE).

Regards,
Clifton



--- End Message ---
--- Begin Message --- Subject: Re: bug#9211: test -l Date: Sun, 31 Jul 2011 18:22:11 -0600 User-agent: Mutt/1.5.21 (2010-09-15)
tag 9211 + notabug
thanks

Clifton Ray Hodges wrote:
> In the test manual for the 'test' command, it states that:
> "INTEGER may also be -l STRING, which evaluates to the length of
> STRING"
> and even in the info page it gives an example of:
> 
> test -l abc -gt 1 && echo yes

Note that it isn't standard.  It is a coreutils extension.

> but that command, as well as any in scripts, reports an error of:
> 
> bash: test: -l: unary operator expected

The error line tells all.  It says "bash: test" and that is the bash
test and not the coreutils test.

  $ type test
  test is a shell builtin

To get the coreutils test you would need to force it to be an external
command.

  $ /usr/bin/test -l abc -gt 1 && echo yes
  yes

Bob


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]