Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #15477

Re: Is this a bug by any chance?

Path csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail
From "" <kfm@plushkava.net>
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 <mailman.1058.1570304608.2651.bug-bash@gnu.org> (permalink)
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 <bug-bash@gnu.org>
To George R Goffe <grgoffe@yahoo.com>
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 <xms:WvKYXQq4TtWhiCGQvjqg_N8scGKXnk1kNM3T6BVUnomgSidCT2Dylw>
X-ME-Proxy-Cause gggruggvucftvghtrhhoucdtuddrgedufedrheefgddugeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gogfhmphhthietlhhirghsucdlvddtmdenucfjughrpeffhffvuffkjghfofggtgfgseht qhertdfjtddunecuhfhrohhmpedffdcuoehkfhhmsehplhhushhhkhgrvhgrrdhnvghtqe enucfkphepudelfedrudefkedrvddukedrudeltdenucfrrghrrghmpehmrghilhhfrhho mhepkhhfmhesphhluhhshhhkrghvrgdrnhgvthenucevlhhushhtvghrufhiiigvpedt
X-ME-Proxy <xmx:WvKYXQtj_3krLShRelRhVhSqZcmj7OLvbSQV6MFhS7NTsowXZGu8sg> <xmx:WvKYXaJZh0qOniY2iPj11nCD-4k_Qg6-6Z_YMDfR2ivuomRQY5mkgQ> <xmx:WvKYXfqYbu0IskS9lPLf5XPBuoRyi8cgQFQulOkMZv26lZ7kfDexVQ> <xmx:WvKYXdXWmPpkA0Wdv7RR0tX6KSijwQWfV2VyEwpQF1J-XVoaxFMY3A>
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 <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <https://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=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

Show key headers only | View raw


On Sat, 5 Oct 2019 18:48:35 +0000 (UTC)
George R Goffe via Bug reports for the GNU Bourne Again SHell <bug-bash@gnu.org> wrote:

> Hi,
> 
> I just built the latest bash in an effort to determine if thie script shows a bug or a ufu. Can you help me please?
> 
> I was expecting to see:
> 12345
> 
> Best regards AND thanks for your help,
> 
> George...
> 
> #!./bash -xv
>  x="1 2 3 4 5"
> + x='1 2 3 4 5'
>  for z in "$x"
>     do
>        echo "$z"
>     done
> + for z in "$x"
> + echo '1 2 3 4 5'
>  1 2 3 4 5
>  exit 0
> + exit 0
> 
> 

It's definitely not a bug. Quoting the expansion inhibits word splitting. Your 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 the addition of a newline character. If your ultimate intent is to store an arbitrary list of strings in a variable prior to iterating over them, you should use an array variable instead. As such, this would be a topic better suited to the help-bash list.

-- 
Kerin Millar

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

Re: Is this a bug by any chance? "" <kfm@plushkava.net> - 2019-10-05 20:43 +0100

csiph-web