From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19808 invoked by alias); 23 Sep 2011 10:50:46 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 16406 Received: (qmail 11763 invoked from network); 23 Sep 2011 10:50:44 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, T_TO_NO_BRKTS_FREEMAIL,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at yahoo.co.uk does not designate permitted sender hosts) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s1024; t=1316774639; bh=H7jhBH3ly8WDKwY8/w400SsRkkl2VzggUMUKxYlpqH8=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:Received:In-reply-to:From:References:To:Subject:Date:Message-ID; b=CcAPYM0sv2eMJNQYeW0T5mlgr/WJZ4XYm5AYpR5P6l5Npy3WRi+et7bpVQcRfR93AhdHuk9SEi1KwU4ull0Mg2SeEhvTkQLm1pguJHOEwLx0pnSV7oIcNXRRnvJq0X/rtWP1f5AAF87ki1nsI/HarfFSVN8u4h77MNm7NNbciLs= X-Yahoo-Newman-Id: 628323.37720.bm@smtp139.mail.ukl.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: oME4BTEVM1nFtW8S_xP2TZ7P9OI4RUDKSs7KAtp54vN.0SA TtUXX5C1S.eEAbOUs.Z_i2lzt3idRnKl2P63u5Kq8UFWLgXE2lFKraj_5TD5 Xyy6i9mFrB1cU5rFspbaZg4bFYbcjtj.joRIW_uqNlCv4CyR3bg012SKDOwU jlZT0LbKkeQB4sJvjtBSA79m8t2gLawPFpnl94HRtgG_jCRxSFPlReXPpfUL X0.cvF7V74VhPu6FoE0eLgzRlaUS8m4B30ES8yYDrvi7AbRMHOq.qkFWr86H cG7tov472qfGHrucqQpnjZk4_O1iWJSdKA1e2D1Ea5stoLwKqcD6nl.6S4gB KvTC54sCkzx0F_.ik3JTY90qBF8OZo.4m3u.v09E- X-Yahoo-SMTP: opAkk_CswBAce_kJ3nIPlH80cJI- In-reply-to: <4E7C5F9D.2070308@gmail.com> From: Oliver Kiddle References: <4E7C5F9D.2070308@gmail.com> To: zsh-users@zsh.org Subject: Re: Strange behavior with "for i in .." Date: Fri, 23 Sep 2011 12:43:58 +0200 Message-ID: <28883.1316774638@thecus.kiddle.eu> Volodya Khomchak wrote: > I faced with strange behavior with "for i in ..". > So the problem is next: > # for i in /etc/profile.d/*.sh;do echo $i;done > # zsh: bad math expression: operand expected at `/etc/profi...' the i variable has somewhere been declared as an integer type. For example with a command such as: typeset -i i or more likely in a math expression such as: (( i = 1 )) You can verify this by doing: typeset -p i or if you prefer: echo ${(t)i} You can use typeset +i i to remove the integer type. However, you may want to check where it is being set. There might be a shell function that should have declared i local. Oliver