On 7/12/25 3:17 AM, Francis Montagnac via users wrote:
On Sat, 12 Jul 2025 00:33:44 -0700
Samuel Sieb 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 "
On Sat, 12 Jul 2025 00:33:44 -0700
Samuel Sieb 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 sho
On 7/12/25 12:18 AM, Francis Montagnac via users wrote:
Hi.
home user wrote:
Here's the real code fragment:
# 220 lines of code above here constructs string variables
# line1, line2, line3, begchars, and endchars.
line1="${begchars}${line1}"
line2="${begchars} ${line2}"
line3="${begchars}
Hi.
home user wrote:
> Here's the real code fragment:
> # 220 lines of code above here constructs string variables
> # line1, line2, line3, begchars, and endchars.
> line1="${begchars}${line1}"
> line2="${begchars} ${line2}"
> line3="${begchars} ${line3}"
> echo "before if, endchars = "${endc
On 7/3/25 4:29 PM, Samuel Sieb wrote:
On 7/3/25 3:11 PM, home user via users wrote:
snip
The things on the right are considered parameters and extra spaces are
removed. You need to quote it as mentioned by others.
longstring="${startstring} ${longstring}"
That will keep all the space