Path: csiph.com!2.eu.feeder.erje.net!feeder.erje.net!goblin2!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail From: "" Newsgroups: gnu.bash.bug Subject: Re: $(<...) fails with nested quoting. Date: Mon, 17 Aug 2020 14:20:49 +0100 Lines: 42 Approved: bug-bash@gnu.org Message-ID: References: <09b3ac09-97ce-9bf2-fac3-e2d10113143d@gmail.com> <30c6f199-581b-dc85-3ecb-7f085b5e8c60@plushkava.net> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: usenet.stanford.edu 1597670460 20864 209.51.188.17 (17 Aug 2020 13:21:00 GMT) X-Complaints-To: action@cs.stanford.edu To: bug-bash@gnu.org Envelope-to: bug-bash@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=plushkava.net; h=subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm3; bh=U HRymGYlpTrUJRaMYKlPMxzkz4QzrBlRyjolihb3kf8=; b=UzNQvsrrjmsxj+V3b Yyz23z3Pdr3F2VMB8lg0ZWcU9O4KWwNaUKYAFViLJlWr2uhAgks7D9BggszAKC7z iH0L8MjYJMUrnmpiWfw8SdyNxnuBeLqoszT2/v8WUyUm4j4HRiOcRBptI5y521O0 Ty5e7gYzGYn8CeMyVtITxX7PddXoBCO4d/pwJjJDc1ru/GypBb9fHiaiTNfVZVcH R4TJggRk5xZI1rkMrvJIvNEPDQs5WGdGIV10GoArZ8o07oBWuQP53D7oRuuCcTmJ BCr6bFBlnhjUbtOxzNvFF9p740uQJn6J2EIYGk5qZ3mhLlokkKEeYWSTtJPTUfcq ntNdA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=UHRymGYlpTrUJRaMYKlPMxzkz4QzrBlRyjolihb3k f8=; b=Hnf9TmU3lPzNw8/KcSEneMiu3FJ3TZoFkqPdUzQEmqVbeSuvUHqtdfp0P ALHUiPrMPaRQip9ALXhIRTkKrJVYG6rJeJ7aweX9GabCFyAHQX9Ox8JsLmWkvyIA NcYJWdDeBpg6ziy/xCswF6KSIIuFSMmiokkD0eHmO1C9N1iCp78AhwCtBQSBHFsO hucLEPFzzN+dr+5nOoySsigKRb6I6VS7OL67/9VutHVlnc+P7YggsB3sdG86Zi7S phe+AxWW1e9b/Rmirvy2dGMgwmj0Z0CH0BU1gtlq+Za1Ps2VxQTKcPbsq+CrzDLj dFtOWsmdkBkJMfNXucTkypHqYCpZA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedruddtfedgiedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgogfhmphhthietlhhirghsucdlvddtmdenucfjug hrpefuvfhfhffkffgfgggjtgfgsehtkeertddtfeejnecuhfhrohhmpedffdcuoehkfhhm sehplhhushhhkhgrvhgrrdhnvghtqeenucggtffrrghtthgvrhhnpeejtddvleefkeefte eggfehuedvgfetkeeftdffhfdtgfduleegueefudehueehgfenucffohhmrghinhepfiho ohhlvggughgvrdhorhhgnecukfhppeduleefrddufeekrddvudekrdduledtnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepkhhfmhesphhluhhs hhhkrghvrgdrnhgvth X-ME-Proxy: User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.1.1 In-Reply-To: <09b3ac09-97ce-9bf2-fac3-e2d10113143d@gmail.com> Content-Language: en-US Received-SPF: pass client-ip=64.147.123.21; envelope-from=kfm@plushkava.net; helo=wout5-smtp.messagingengine.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/17 09:20:53 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FROM_BLANK_NAME=0.723, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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: <30c6f199-581b-dc85-3ecb-7f085b5e8c60@plushkava.net> X-Mailman-Original-References: <09b3ac09-97ce-9bf2-fac3-e2d10113143d@gmail.com> Xref: csiph.com gnu.bash.bug:16764 On 17/08/2020 04:03, Steven McBride wrote: > Configuration Information [Automatically generated, do not change]: > Machine: x86_64 > OS: linux-gnu > Compiler: gcc > Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' > -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu' > -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' > -DSHELL -DHAVE_CONFIG_H   -I.  -I../. -I.././include -I.././lib > -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 > -fdebug-prefix-map=/build/bash-N2nMjo/bash-4.4.18=. > -fstack-protector-strong -Wformat -Werror=format-security -Wall > -Wno-parentheses -Wno-format-security > uname output: Linux tau5vbub1 4.15.0-112-generic #113-Ubuntu SMP Thu Jul > 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux > Machine Type: x86_64-pc-linux-gnu > > Bash Version: 4.4 > Patch Level: 20 > Release Status: release > > Description: >         'echo "$(<\"filename\")"' fails with No such file or directory > error. >     'echo "$(cat \"filename\")"'  also fails no such file or directory > error. >     'echo "$(     'echo $(<"filename")' is okay. >     I think I'm doing the nested double quoting correctly. Only in the last case. There is no bug here. >     The quoting is because in my original case 'filename' was >     a variable that could contained a filename with spaces in it. "$(<"$filename")" For an explanation, see https://mywiki.wooledge.org/CommandSubstitution. -- Kerin Millar