Giuseppe Sacco <[EMAIL PROTECTED]> wrote: > Il giorno mar, 16/05/2006 alle 19.38 +0200, Frank Küster ha scritto: > [...] >> By the way, please don't close this bug with "applied patch by Frank >> Küster". There's no useful information in such an entry. Rather say >> "fixed bashism and logic error in postrm script" or something like >> that. > > Thanks for pointing all these problems. > I will change the syntax in order to work with every shell, but I > already tried with bash, dash, ksh. So I think it will work for every > shell: > > ~$ for i in bash dash ksh > do > echo 'if [ 1 -eq 1 -a 3 -ne 4 ]; then echo A; else echo B; fi' | $i > done > ~$
I was about to write "that's because dash is only strict if it is invoked as /bin/sh", but that's not true - it still works. I guess that's a bug in dash, since this syntax is in fact *not* POSIX: http://www.opengroup.org/onlinepubs/009695399/utilities/test.html SUSV2 also does not have it. I'll report a bug against dash... Regards, Frank -- Frank Küster Single Molecule Spectroscopy, Protein Folding @ Inst. f. Biochemie, Univ. Zürich Debian Developer (teTeX)