Path: csiph.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!goblin2!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail From: Ilkka Virta Newsgroups: gnu.bash.bug Subject: Re: $(<...) fails with nested quoting. Date: Mon, 17 Aug 2020 16:12:10 +0300 Lines: 17 Approved: bug-bash@gnu.org Message-ID: References: <09b3ac09-97ce-9bf2-fac3-e2d10113143d@gmail.com> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: usenet.stanford.edu 1597674122 23375 209.51.188.17 (17 Aug 2020 14:22:02 GMT) X-Complaints-To: action@cs.stanford.edu Cc: bug-bash@gnu.org, bash@packages.debian.org To: Steven McBride Envelope-to: bug-bash@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=CLo3Ak7AK/RShQ51fQmgSVvtz8pPi5Mru4I7ZeYIpy4=; b=Kf4zRikQwuge4v3sozjleVmkt7hlPkov6KmVPfMDfmMXh2wJTTCp7B/lVKuHOry5zP +aaUJl155aB17jVnAv0rmKYF/ayGpJWEkU5eZw73aCblWK1C9/81yQSoD3IeW2fNNgvX /N8ZHkYTUGrvetam19lwaX/f6JYAYo7Z7klPwnyn58Xu4Kk9dkZ2yq348C48+yxM37zd VQe8IrOAwLNrm0odbeLkLPj5BUVVUjaVmzTyMttwtUSy00XldeuzH8go1HUiLmntoWc3 QnMbKQ9c3D6IoXbnPxYcxkH1Jz/yZXlfscthv2ptBcR0aq0WRcQjBTynx/khOFO7WfSq IlUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=CLo3Ak7AK/RShQ51fQmgSVvtz8pPi5Mru4I7ZeYIpy4=; b=VFbL9eTYTvJIDYOCThEmGmL8XSRX8izMa7FMrPpPFFCTH0s03m9/uin2DYAs6Ckomg lu8O+sg7WIjO4uma7mpIBugptWNI8fi/jCTIPBWZ44fYk6oTuJ/wbgOYiW7TpIlwQpj0 bjYopIjg7eeWeeGgSQYj0ReQhGLbebu3SkxuXovIauxcMOobbIwZ0C+9GuRrV9Au/dY5 WOxM01DHJrNcfFRMRUHUkEW6AdCjO9G5GwcuojydGw1TVALwC9GZL+Kuko0aQ9U+7Uh1 ErDJFlUHFM4zGS2vc8bZopGJ+6t7+0hftRi+JXMF7Kb87WICP8w7i9nDyJflsJ+yaQle TY9w== X-Gm-Message-State: AOAM530ZghwIPTrOttKTxSFghLdHHruR1WC+QTMw4G24ohVFdKgYrvMA +l6eTUZbeskRgmQdW1ubPoXZrc0rwVMVwVaFsbg= X-Google-Smtp-Source: ABdhPJy9Me6U7XKWo7ygVemcC6S5qnFRp52L5qZSLXiTC0QR35iZrKr07cRRux49s59qXcFxykE711aJqg9C2GeodFE= X-Received: by 2002:a2e:9a11:: with SMTP id o17mr6969438lji.314.1597669941408; Mon, 17 Aug 2020 06:12:21 -0700 (PDT) In-Reply-To: <09b3ac09-97ce-9bf2-fac3-e2d10113143d@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::22c; envelope-from=itvirta@gmail.com; helo=mail-lj1-x22c.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 17 Aug 2020 10:22:01 -0400 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 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: X-Mailman-Original-References: <09b3ac09-97ce-9bf2-fac3-e2d10113143d@gmail.com> Xref: csiph.com gnu.bash.bug:16767 On Mon, Aug 17, 2020 at 3:53 PM Steven McBride wrote: > 'echo "$(<\"filename\")"' fails with No such file or directory > Quotes inside $() are independent from the ones outside. If you escape them, you get literal quotes as part of the filename. $ echo hello > '"filename"' $ echo "$(<\"filename\")" hello $ echo another > 'name with spaces' $ echo "$(<"name with spaces")" another I've been led to understand this isn't so with backticks, though.