trans-coord-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: More nits


From: Kaloian Doganov
Subject: Re: More nits
Date: Wed, 27 Feb 2008 15:11:50 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gNewSense gnu/linux)

Yavor Doganov <address@hidden> writes:

    Isn't this exactly the opposite?

Of course, thanks.

    Double brackets here.
    Likewise.

Although not an error with double brackets, single brackets are somewhat
shorter and easier to read.

    > +if [[ ( -z "$DRY_RUN" ) && ( "$CMDSTATUS" -ne 0 ) ]]; then
    > +    mail "$RCPT" --subj "$SUBJECT" < "$TMP"
    > +fi

    Isn't the standard way of doing this

    if [ condition A ] && [ condition B ]; then

    At least this is what I've encountered so far.

Why the latter form is preferred?

I do not have experience on reading and writing and reading shell
scripts.  If there are any standards concerning Bash scripting please
point me to them so I can educate myself.  Obviously Bash info pages are
not suitable enough for learning how to write good scripts. :-/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]