Re: My script almost works but spams the terminal its launched from if useing dash.
Hi,
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
like
if test "x${InMail}" = xgene
which avoids to compare empty variable content.
See also
https://www.gnu.org/software/autoconf/manual/autoconf-2.64/html_node/Portable-Shell.html
Have a nice day :)
Thomas
Reply to: