bug-bash
[Top][All Lists]
Advanced

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

comments inside command subst are handled inconsistently


From: Denys Vlasenko
Subject: comments inside command subst are handled inconsistently
Date: Thu, 27 Jul 2023 10:31:50 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0

Try these two commands:

$ echo "Date: `date #comment`"
Date: Thu Jul 27 10:28:13 CEST 2023

$ echo "Date: $(date #comment)"
)"
Date: Thu Jul 27 10:27:58 CEST 2023


As you see, #comment is handled differently in `` and $().
I think the handling in `` makes more sense.




reply via email to

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