Re: [dev] Shell style guide

From: Martin Kühne <>
Date: Thu, 8 Sep 2016 16:15:42 +0200

On Thu, Sep 8, 2016 at 4:11 PM, Greg Reagle <> wrote:
> On Thu, Sep 8, 2016, at 10:05 AM, Kamil Cholewiński wrote:
>> Wow, shell quoting is just fucked up crazy. I was mostly using unquoted
>> $_AT_ my whole life. And here I thought I knew enough not to screw up a
>> simple script,
> It is common knowledge to always double-quote $_AT_, i.e. "$@", in
> Bourne/Posix shell.

Bash really is a special little snowflake.
The space trimming feature, as I recently discovered is made available
for all but the implicit REPLY.

$ read -r <<<" TEST "; printf '<%s>\n' "$REPLY"
< TEST >
$ read -r REPLY <<<" TEST "; printf '<%s>\n' "$REPLY"

As a heavy user of bash and freenode #bash padawan, I must say that
I'd be very in favor of keeping bash out of suckless.
It's a good learning instrument wrt this kind of nitpickery which is
useful for discussing the C standard, but it's definitely not

Received on Thu Sep 08 2016 - 16:15:42 CEST

This archive was generated by hypermail 2.3.0 : Thu Sep 08 2016 - 16:24:19 CEST