Re: [dev] Shell style guide
On Tue, Sep 6, 2016 at 12:07 PM, Ali H. Fardan <raiz_AT_firemail.cc> wrote:
> one more thing, multiline vs one-line statements:
>
> if [ expr ... ]; then
> ...
> fi
>
> versus
>
> if [ expr ... ]
> then
> ...
> fi
>
> this applies to others as well:
>
> while [ expr ... ]
> do
> ...
> done
>
> I'd stick with the multiline style, what about you?
I tend to prefer single line. I equate them to the opening braces in
C, and I like being able to read more code at once on a screen.
if (foo) {
...
}
if [ "$foo" ]; then
...
fi
Received on Tue Sep 06 2016 - 21:10:04 CEST
This archive was generated by hypermail 2.3.0
: Tue Sep 06 2016 - 21:12:32 CEST