Path: csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail From: "" Newsgroups: gnu.bash.bug Subject: Re: Is this a bug by any chance? Date: Sat, 5 Oct 2019 20:43:20 +0100 Lines: 42 Approved: bug-bash@gnu.org Message-ID: References: <99440807.4131727.1570301315442.ref@mail.yahoo.com> <99440807.4131727.1570301315442@mail.yahoo.com> <20191005204320.5ada9d998f011fd8f0b37d9b@plushkava.net> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: usenet.stanford.edu 1570304608 30382 209.51.188.17 (5 Oct 2019 19:43:28 GMT) X-Complaints-To: action@cs.stanford.edu Cc: George R Goffe via Bug reports for the GNU Bourne Again SHell To: George R Goffe Envelope-to: bug-bash@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=plushkava.net; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=fm3; bh= SLIDJbZDyowHABC+dn8sslSx/MVhr4/Ns25R9+POJ/Y=; b=ci+bkWBiY4Zz3iH9 qDE/h40nC8hF6+9qPOCJLAChqJiD8m5ipXAhsPPCyo9iIqSImjZYXYuAJ5FojW6y fJgVsNrNAQjQ6vbOyE2B2i9Mqp+GD4pz4fqyzgDth0lzJan7oHppUgteS30x1PG+ MsaJA3RkCrKuBrIOwhfJPup1L4QEC7euGHCQD0rkDLm41pY+NjR/zdPhrYQeXiaw RYnDXCNJ5ek2KW/hGbOs9nGcCEKFbrUZsbjwYSolWRWUT4ackunlcmoTgV2lhyVn 1RDgLoYMt2wfUE1/ZCB17bhwARknVDXh9gn0z9N5Ru5Ub9h3BtoCgEzEmd4g72yo 0epoCA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=SLIDJbZDyowHABC+dn8sslSx/MVhr4/Ns25R9+POJ /Y=; b=jmVfa44ESRiuXOzR3bR/+drdAdo21WsffotUaS4BASVJVpIxYcyTNeJ+w WyMlXlbLZ9ZdND1lGtptN2sK1dNGRXhvsThdxgFN+BSEqVCNXZ1AJQurfIFOOZdD GdIwn35uqFfh+KXPq+3ATaevLCJ5PvJu8p5IKs9K/vwhfI/+zQVHagwV+zwO0ZhN 0BjeTlokDa8rmapp6tuqmPFQKajZjw//7o8MQGvd6bOQWdi0H8QCTbSpFlHYfBC2 lpDTePRXWFyIZ93K4AFK6OGcJJH/N4SeXBXm9MqTLAPntDzXz2Sdy+fR8lucXsEI Xa37kuhzFf9P4gyE9951bU0Kp33pw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrheefgddugeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gogfhmphhthietlhhirghsucdlvddtmdenucfjughrpeffhffvuffkjghfofggtgfgseht qhertdfjtddunecuhfhrohhmpedffdcuoehkfhhmsehplhhushhhkhgrvhgrrdhnvghtqe enucfkphepudelfedrudefkedrvddukedrudeltdenucfrrghrrghmpehmrghilhhfrhho mhepkhhfmhesphhluhhshhhkrghvrgdrnhgvthenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: In-Reply-To: <99440807.4131727.1570301315442@mail.yahoo.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.111.4.28 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <20191005204320.5ada9d998f011fd8f0b37d9b@plushkava.net> X-Mailman-Original-References: <99440807.4131727.1570301315442.ref@mail.yahoo.com> <99440807.4131727.1570301315442@mail.yahoo.com> Xref: csiph.com gnu.bash.bug:15477 On Sat, 5 Oct 2019 18:48:35 +0000 (UTC) George R Goffe via Bug reports for the GNU Bourne Again SHell wrote: > Hi, >=20 > I just built the latest bash in an effort to determine if thie script sho= ws a bug or a ufu. Can you help me please? >=20 > I was expecting to see: > 12345 >=20 > Best regards AND thanks for your help, >=20 > George... >=20 > #!./bash -xv > =A0x=3D"1 2 3 4 5" > + x=3D'1 2 3 4 5' > =A0for z in "$x" > =A0=A0=A0 do > =A0=A0=A0=A0=A0=A0 echo "$z" > =A0=A0=A0 done > + for z in "$x" > + echo '1 2 3 4 5' > =A01 2 3 4 5 > =A0exit 0 > + exit 0 >=20 >=20 It's definitely not a bug. Quoting the expansion inhibits word splitting. Y= our loop iterates once over a single word. Said word is conveyed to echo as= a single argument. In this case, said argument is printed by echo, with th= e addition of a newline character. If your ultimate intent is to store an a= rbitrary list of strings in a variable prior to iterating over them, you sh= ould use an array variable instead. As such, this would be a topic better s= uited to the help-bash list. --=20 Kerin Millar