GNU bug report logs - #68501
Misbehaving of text inside double quotes" " in shell

Previous Next

Package: coreutils;

Reported by: LitHack <lithack0 <at> gmail.com>

Date: Tue, 16 Jan 2024 11:46:01 UTC

Severity: normal

To reply to this bug, email your comments to 68501 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#68501; Package coreutils. (Tue, 16 Jan 2024 11:46:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to LitHack <lithack0 <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Tue, 16 Jan 2024 11:46:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: LitHack <lithack0 <at> gmail.com>
To: bug-coreutils <at> gnu.org
Subject: Misbehaving of text inside double quotes" " in shell
Date: Tue, 16 Jan 2024 16:20:41 +0530
[Message part 1 (text/plain, inline)]
Single quote behave normally but double quote is replacing the "$$"
character with pid of open shell and "$<some text >" would not print
anything as if it acting as a comment. Basically the problem is that double
is parsing some of special character which it should not.
In the attachment you would see hash having "$" in between then and is
being parsed as mentioned above and hence does not write anything in file.
Thanks and Regards.
[Message part 2 (text/html, inline)]
[Screenshot from 2024-01-16 15-20-47.png (image/png, attachment)]

Information forwarded to bug-coreutils <at> gnu.org:
bug#68501; Package coreutils. (Tue, 16 Jan 2024 11:55:02 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Thomas Wolff <towo <at> towo.net>
To: bug-coreutils <at> gnu.org
Subject: Re: bug#68501: Misbehaving of text inside double quotes" " in shell
Date: Tue, 16 Jan 2024 12:53:57 +0100

Am 16/01/2024 um 11:50 schrieb LitHack:
> Single quote behave normally but double quote is replacing the "$$"
> character with pid of open shell and "$<some text >" would not print
> anything as if it acting as a comment. Basically the problem is that double
> is parsing some of special character which it should not.
> In the attachment you would see hash having "$" in between then and is
> being parsed as mentioned above and hence does not write anything in file.
> Thanks and Regards.
That is normal shell behaviour. $y expands to the value of variable y, 
$j9T of variable j9T etc.
Try setting some variables before to verify. And use single quote for 
every string that should not be expanded.




This bug report was last modified 1 year and 155 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.