help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why no closing single quote is needed when a single quote is escaped


From: Eli Schwartz
Subject: Re: Why no closing single quote is needed when a single quote is escaped?
Date: Wed, 30 Dec 2020 23:30:29 -0500

On 12/30/20 11:26 PM, Peng Yu wrote:
Hi,

x='\'
The above command works. But the following command doesn't. It doesn't
make sense to me why the above command should work without closing the
initial single quote. Could anybody help explain why this syntax
should be correct? Thanks.

x="\"

The difference between single quoting and double quoting is fully explained in the bash manual page, under the section "QUOTING".

--
Eli Schwartz
Arch Linux Bug Wrangler and Trusted User

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]