Re: [dev] Shell style guide

From: Evan Gates <evan.gates_AT_gmail.com>
Date: Thu, 8 Sep 2016 07:30:10 -0700

On Thu, Sep 8, 2016 at 7:26 AM, Greg Reagle <greg.reagle_AT_umbc.edu> wrote:
> On Thu, Sep 8, 2016, at 10:11 AM, 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.
>
> At the same time, it is something that everyone has to learn at some
> point. We are not born knowing this. There was a time before I knew it
> too. So I don't mean to be critical of you personally.
>

The problem (as I see it) is that no one takes shell scripting
seriously. They never take the time to sit down and study it the way
they do for other languages. That and 99% of the scripts you'll find
in the wild are pure crap.

I'll take this chance to plug the bash guide[0] again. And especially
the pitfalls[1] and faq[2]. If you don't want to work through the
whole guide (which you should), at least read the pitfalls and faq.

[0]http://mywiki.wooledge.org/BashGuide
[1]http://mywiki.wooledge.org/BashPitfalls
[2]http://mywiki.wooledge.org/BashFAQ
Received on Thu Sep 08 2016 - 16:30:10 CEST

This archive was generated by hypermail 2.3.0 : Thu Sep 08 2016 - 16:36:23 CEST