Re: weird behaviour of quotes in dash variable assignments
On Mon, Sep 21, 2020 at 12:59:32PM -0400, Gary Dale wrote:
> Did you try it with Konsole? I got
>
> $ hd
> a b
> 00000000 61 20 20 20 20 20 20 20 62 0a |a b.|
> 0000000a
In other words, konsole *did* alter the contents.
> Most shells (all that I am aware of) treat tabs and blanks as generic white
> space - not relevant to the execution of the code.
Between arguments, sure. Tabs and spaces are equivalent in those places.
But inside a quoted string argument? No, they're not equivalent.
Who knows what other conversions might have taken place?
You were trying to troubleshoot a script that wasn't doing what you
expected. And yet you just hand-waved everything, rather than getting
in there and doing the work to actually *check* things.
Reply to: