Xref: utzoo comp.unix.questions:18377 comp.unix.wizards:19712 Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!samsung!shadooby!sharkey!itivax!scs From: scs@itivax.iti.org (Steve Simmons) Newsgroups: comp.unix.questions,comp.unix.wizards Subject: Ksh test difference? Message-ID: <4641@itivax.iti.org> Date: 12 Dec 89 15:23:48 GMT Followup-To: comp.unix.questions Organization: Industrial Technology Institute, Ann Arbor, MI. Lines: 17 I've recently observed a difference between ksh and sh. The ksh is the one on the UNIX-PC. The following script works correctly with all bourne shells I've found, but fails on that ksh: if [ -w foo -r foo ] ; then echo file foo is readable and writable else echo file foo is not readable and writable fi On ksh I get a syntax error. Changing the first line to if [ -w foo -a -r foo ] ; then causes it to work correctly on all systems. -- Steve Simmons scs@iti.org Industrial Technology Institute '"You're not a big name on Usenet until someone puts you in their .sig file." -- Anonymous'