Path: csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail From: Ilkka Virta Newsgroups: gnu.bash.bug Subject: Re: Combination of "eval set -- ..." and $() command substitution is slow Date: Tue, 16 Jul 2019 12:18:45 +0300 Lines: 26 Approved: bug-bash@gnu.org Message-ID: References: <8091.1563212947@jinx.noi.kre.to> <08d234bc-5dca-38f5-cb38-02b0c7fee542@iki.fi> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: usenet.stanford.edu 1563268736 24696 209.51.188.17 (16 Jul 2019 09:18:56 GMT) X-Complaints-To: action@cs.stanford.edu Cc: bug-bash@gnu.org To: Robert Elz Envelope-to: bug-bash@gnu.org User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:60.0) Gecko/20100101 Thunderbird/60.7.1 In-Reply-To: <8091.1563212947@jinx.noi.kre.to> Content-Language: en-US X-SASI-RCODE: 200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; h=subject:to:cc:references:from:message-id:date:mime-version:in-reply-to:content-type:content-transfer-encoding; s=smtp; bh=n7BY/TWv9EODKXTB1B7iRU0WURA2jYsNSuGpq5Mb9/Q=; b=c0gjYcNg6PyG/0o05Xw1mLyOfXbjMr19LXTgVai37QyOtmjpSm8diVsOR1d8W/B5iv1ScatMQaBbpPQwIwwitfEShYeVd9A+7teuxLiKS1zqCzV2gUZwYhzZuXMtTSNclGesgsdt/aboPd7nt2+aT7kIbE6fVzvlJLXM50xpVoqh0tlKQi1lUwByDl5+42N816OzAdYrSsyfE87zYWqOcAhCrKT2VB/N2yTYOwaKDBzQmgWZJ8geU+uQqq4bJYFISdg575L1B/SElKhLtKCoXP/0AIwefoDWVl9pf4Dy8CN3KKCR2sj1WOMosdbt7JYU9y12UpjqhJrbj2r8efmAGg== X-detected-operating-system: by eggs.gnu.org: FreeBSD 8.x X-Received-From: 157.24.2.213 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: <08d234bc-5dca-38f5-cb38-02b0c7fee542@iki.fi> X-Mailman-Original-References: <8091.1563212947@jinx.noi.kre.to> Xref: csiph.com gnu.bash.bug:15175 On 15.7. 20:49, Robert Elz wrote: > printf '%s\n' "`printf %s "$i"`" > printf '%s\n' "$(printf %s "$i")" > > aren't actually the same. In the first $i is unquoted, in the second it is > quoted. Huh, really? It looks to me like the first one treats $i as quoted too: $ touch file.txt; i='123 *' $ printf '%s\n' "`printf :%s: "$i"`" :123 *: But not here, of course: $ printf '%s\n' "`printf :%s: $i`" :123::file.txt: I tried with Bash and some other shells, but couldn't find one where the result was different. Did I miss something? -- Ilkka Virta / itvirta@iki.fi