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

Re: My script almost works but spams the terminal its launched from if useing dash.


Gene Heskett wrote:
>         if [[ ${InMail} = 'gene' ]]

test(1) is supposed to be portable

          if test "${InMail}" = 'gene'

> There are too many places where a conditional would be needed

The classic way is to use only gestures which are supported by the
Bourne shell and to avoid certain peculiarities of some shells.
In ./configure scripts of source packages one can see gestures

          if test "x${InMail}" = xgene

which avoids to compare empty variable content.

See also

Have a nice day :)


Reply to: