From unknown Sat Jun 21 12:22:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9211: test -l Resent-From: Clifton Ray Hodges Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Sun, 31 Jul 2011 22:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 9211 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: 9211@debbugs.gnu.org X-Debbugs-Original-To: bug-coreutils@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.131215247026534 (code B ref -1); Sun, 31 Jul 2011 22:48:02 +0000 Received: (at submit) by debbugs.gnu.org; 31 Jul 2011 22:47:50 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QnenV-0006ts-5B for submit@debbugs.gnu.org; Sun, 31 Jul 2011 18:47:50 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QnWgF-0008Rk-SM for submit@debbugs.gnu.org; Sun, 31 Jul 2011 10:07:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QnWfy-0000Z4-DM for submit@debbugs.gnu.org; Sun, 31 Jul 2011 10:07:31 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,HTML_MESSAGE, RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:44695) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QnWfy-0000Z0-BS for submit@debbugs.gnu.org; Sun, 31 Jul 2011 10:07:30 -0400 Received: from eggs.gnu.org ([140.186.70.92]:58521) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QnWfx-0006Tb-D3 for bug-coreutils@gnu.org; Sun, 31 Jul 2011 10:07:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QnWfw-0000YY-Cj for bug-coreutils@gnu.org; Sun, 31 Jul 2011 10:07:29 -0400 Received: from vms173005pub.verizon.net ([206.46.173.5]:56399) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QnWfw-0000YF-7P for bug-coreutils@gnu.org; Sun, 31 Jul 2011 10:07:28 -0400 Received: from [192.168.1.42] ([unknown] [108.15.219.15]) by vms173005.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0LP70049HB7YZ5Y2@vms173005.mailsrvcs.net> for bug-coreutils@gnu.org; Sun, 31 Jul 2011 09:07:11 -0500 (CDT) Message-id: <4E3561A8.40009@clifton-hodges.com> Date: Sun, 31 Jul 2011 10:07:36 -0400 From: Clifton Ray Hodges 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 MIME-version: 1.0 Content-type: multipart/alternative; boundary=------------060304050709000705060302 X-detected-operating-system: by eggs.gnu.org: Solaris 10 (1203?) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -6.6 (------) X-Mailman-Approved-At: Sun, 31 Jul 2011 18:47:48 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.6 (------) This is a multi-part message in MIME format. --------------060304050709000705060302 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 --------------060304050709000705060302 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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


--------------060304050709000705060302-- From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 31 20:22:36 2011 Received: (at control) by debbugs.gnu.org; 1 Aug 2011 00:22:36 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QngHE-0000g0-09 for submit@debbugs.gnu.org; Sun, 31 Jul 2011 20:22:36 -0400 Received: from joseki.proulx.com ([216.17.153.58]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QngH9-0000fm-UC; Sun, 31 Jul 2011 20:22:32 -0400 Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id EB54921361; Sun, 31 Jul 2011 18:22:11 -0600 (MDT) Received: by hysteria.proulx.com (Postfix, from userid 1000) id C5C262DC7C; Sun, 31 Jul 2011 18:22:11 -0600 (MDT) Date: Sun, 31 Jul 2011 18:22:11 -0600 From: Bob Proulx To: Clifton Ray Hodges Subject: Re: bug#9211: test -l Message-ID: <20110801002211.GA30741@hysteria.proulx.com> References: <4E3561A8.40009@clifton-hodges.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E3561A8.40009@clifton-hodges.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Score: -2.5 (--) X-Debbugs-Envelope-To: control Cc: 9211-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.5 (--) 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 From unknown Sat Jun 21 12:22:53 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Clifton Ray Hodges Subject: bug#9211: closed (Re: bug#9211: test -l) Message-ID: References: <20110801002211.GA30741@hysteria.proulx.com> <4E3561A8.40009@clifton-hodges.com> X-Gnu-PR-Message: they-closed 9211 X-Gnu-PR-Package: coreutils X-Gnu-PR-Keywords: notabug Reply-To: 9211@debbugs.gnu.org Date: Mon, 01 Aug 2011 00:23:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1312158183-2656-1" This is a multi-part message in MIME format... ------------=_1312158183-2656-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #9211: test -l which was filed against the coreutils package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 9211@debbugs.gnu.org. --=20 9211: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D9211 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1312158183-2656-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 9211-done) by debbugs.gnu.org; 1 Aug 2011 00:22:36 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QngHD-0000fy-Jy for submit@debbugs.gnu.org; Sun, 31 Jul 2011 20:22:35 -0400 Received: from joseki.proulx.com ([216.17.153.58]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QngH9-0000fm-UC; Sun, 31 Jul 2011 20:22:32 -0400 Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id EB54921361; Sun, 31 Jul 2011 18:22:11 -0600 (MDT) Received: by hysteria.proulx.com (Postfix, from userid 1000) id C5C262DC7C; Sun, 31 Jul 2011 18:22:11 -0600 (MDT) Date: Sun, 31 Jul 2011 18:22:11 -0600 From: Bob Proulx To: Clifton Ray Hodges Subject: Re: bug#9211: test -l Message-ID: <20110801002211.GA30741@hysteria.proulx.com> References: <4E3561A8.40009@clifton-hodges.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E3561A8.40009@clifton-hodges.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Score: -2.5 (--) X-Debbugs-Envelope-To: 9211-done Cc: 9211-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.5 (--) 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 ------------=_1312158183-2656-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 31 Jul 2011 22:47:50 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QnenV-0006ts-5B for submit@debbugs.gnu.org; Sun, 31 Jul 2011 18:47:50 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QnWgF-0008Rk-SM for submit@debbugs.gnu.org; Sun, 31 Jul 2011 10:07:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QnWfy-0000Z4-DM for submit@debbugs.gnu.org; Sun, 31 Jul 2011 10:07:31 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,HTML_MESSAGE, RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:44695) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QnWfy-0000Z0-BS for submit@debbugs.gnu.org; Sun, 31 Jul 2011 10:07:30 -0400 Received: from eggs.gnu.org ([140.186.70.92]:58521) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QnWfx-0006Tb-D3 for bug-coreutils@gnu.org; Sun, 31 Jul 2011 10:07:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QnWfw-0000YY-Cj for bug-coreutils@gnu.org; Sun, 31 Jul 2011 10:07:29 -0400 Received: from vms173005pub.verizon.net ([206.46.173.5]:56399) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QnWfw-0000YF-7P for bug-coreutils@gnu.org; Sun, 31 Jul 2011 10:07:28 -0400 Received: from [192.168.1.42] ([unknown] [108.15.219.15]) by vms173005.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0LP70049HB7YZ5Y2@vms173005.mailsrvcs.net> for bug-coreutils@gnu.org; Sun, 31 Jul 2011 09:07:11 -0500 (CDT) Message-id: <4E3561A8.40009@clifton-hodges.com> Date: Sun, 31 Jul 2011 10:07:36 -0400 From: Clifton Ray Hodges 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 MIME-version: 1.0 To: bug-coreutils@gnu.org Subject: test -l Content-type: multipart/alternative; boundary=------------060304050709000705060302 X-detected-operating-system: by eggs.gnu.org: Solaris 10 (1203?) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -6.6 (------) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sun, 31 Jul 2011 18:47:48 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.6 (------) This is a multi-part message in MIME format. --------------060304050709000705060302 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 --------------060304050709000705060302 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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


--------------060304050709000705060302-- ------------=_1312158183-2656-1--