On 7/12/25 3:17 AM, Francis Montagnac via users wrote:
On Sat, 12 Jul 2025 00:33:44 -0700
Samuel Sieb <sam...@sieb.net> wrote:
On 7/12/25 12:18 AM, Francis Montagnac via users wrote:
echo "before if, endchars = "${endchars}"."
Beware: word splitting will be done here when expanding ${endchars}
because the " before it closes the first "
You should quote the inner ":
echo "before if, endchars = \"${endchars}\"."
It doesn't look like there are supposed to be any quotes. It should
be simply:
echo "before if, endchars = ${endchars}."
I think that the OP wants to show the spaces in the endchars variable,
even the starting and ending ones, and thus adds a " before and after
it.
That said, he was backslashing properly the " in the previous
messages.
Thank-you, Francis and Samuel. I actually had that fixed several days
ago, and it works as I want.
That echo is indeed for debugging. Francis is correct: I'm wanting to
see if the desired spaces are there. I want the quotes in the output to
make clear the start and end of the output of endchars.
I made this comment when showing his last message from the hyperkitty
web interface, but I found since that this interface do NOT show the
backslashes :-(
See my previous message: no backslashes around ${endchars}:
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org/message/DFNN2E6SIRKBYPPEY2NB6AWKSZXYWMOO/
But it appears to be just a debugging statement anyway.
Right.
I just now fixed the "if" statement; it works as it should. I also
changed it to a (hopefully) more clear form:
if [ -n "$endchars" ]; then # if $endchars is not empty
--
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam, report it:
https://pagure.io/fedora-infrastructure/new_issue