From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28630 invoked by alias); 19 Sep 2011 20:29:33 -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: 16386 Received: (qmail 24731 invoked from network); 19 Sep 2011 20:29:22 -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=0.7 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at yahoo.com does not designate permitted sender hosts) X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 806906.99749.bm@omp1008.mail.ne1.yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1316463747; bh=Zyu9PL4+6q64u49OS/J2C4kdEia/Tpz8/0T40CXnmTk=; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=QDQlZCkHG8CYsChIZC+GRDUB4sSuZzf7Z+JRXs2liz2J0vUWUGuuqh9va7t2q07nl3Ha2/KTnXhJEn7/6IuxS5M7IyzEuoAJoa+q1jNNv4wxqk2Z5xZOwZPhOp6GVlXNNRVnQlBC986x1SoLPbzd0Rl2eI2NpfA8Br1gykc803Q= DomainKey-Signature:a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=hQX+VVYqDH4Ixjc8M9PuZ+nLJcRA3BkKM5j7WVkU8Cnj2IzF3jYmcFhrQ3hqpiZM6cNAdcEZCkerJ5aeroJgL0sKCOkux6g39xKfeOoKAzqt2xG4xyatMcAcPg5Yf8Q6uucdmQ+pG4LKru+SHW8ma6eJ3pFmZXmJm5GNpJ+Ocqc=; X-YMail-OSG: dO5ZZxgVM1k913vtDjgZIopdnmhXroAkB97mlxN1Qpo5z4L 8a5N_xay.6L55WBZdXIur6r0ZHgQT9Zl2fWBAbJNt9F026H1EmDpx2oNRFHA deNBWObcAY3Uz_A44eDAqgjbcTzqpIG4qRELIKkRVVYOgiCITDI7daLqhAnH ybBLhMsIjy5rKanvOx4QOotqqSPsVlD9PC_.WRlRsCax9srHKM87xTSSc.B. eDXM5G0ZkC3etHL5tLqXB8JAmyyQbBN8Pcxg_VGhk9lRa_UWBWR2Uazc4dH9 eR9QhWf2MDDhVd1Te9YcqgaFex5IVvQcr092GxVjGLF6ChxbluL5BFBlasQ_ GmJWvimZLVzYbUM5r39.MBK_HqaSV6_4.S7QdsX_DDDTIYkSDU_zkc_f2W33 MyRVoR8W4R0ocjrqQL5GxvbOgr7zrLxlYzJ_AHhFaQ6t3qY2T8O0Y7IqRT3T lLw1I X-Mailer: YahooMailWebService/0.8.113.315625 Message-ID: <1316463747.16563.YahooMailNeo@web36607.mail.mud.yahoo.com> Date: Mon, 19 Sep 2011 13:22:27 -0700 (PDT) From: david sowerby Reply-To: david sowerby Subject: variable/array element question To: "zsh-users@zsh.org" MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="-2114655128-1450525164-1316463747=:16563" ---2114655128-1450525164-1316463747=:16563 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable I did array=3D( $(ls -l ) )=0Aprint $array=A0 =0A=0Aand got an error= =A0 Hmmmm......=0Adid print ${array[2,9]} and got the expected result: elem= ents 2-9=0Aso zsh didn't like the first element=0AExperimenting I did =0A= =0Als -l | while read one two three four etc ; do print $one $two $t= hree ; done=0Asame error =0A=0ASo after using zsh for 2 years , I've just d= iscovered that it doesn't like variables to start with '-' .=0AObviously I = can use Awk for this example, but I was curious as to why this is? =0A=0AI = have bash and dash installed and neither have a problem with '-', don't hav= e ksh so don't know about it.=0AThanks in advance of the answer=A0=A0 -----= ------------david=0A=0A=A0=0A----------------------------------------------= ---------------=0AVeloci-rapture - when dinosaurs go to heaven.=0A---------= ---------------------------------------------------- ---2114655128-1450525164-1316463747=:16563--