david@doe.utoronto.ca (David Megginson) (04/28/91)
Has anyone released patches so that the Minix shell can use the if [ <condition> ] syntax instead of the if test <condition> syntax? I'm no Bourne Shell wizard, but most of the shell scripts I find from Unix expect the brackets. Thank you for any info, and even flames might be appreciated. -- //////////////////////////////////////////////////////////////////////// / David Megginson david@doe.utoronto.ca / / Centre for Medieval Studies meggin@vm.epas.utoronto.ca / ////////////////////////////////////////////////////////////////////////
ralf@ptavv.ka.sub.org (Ralf Wenk) (04/29/91)
In article <1991Apr27.190119.9776@doe.utoronto.ca> david@doe.utoronto.ca (David Megginson) writes: > > Has anyone released patches so that the Minix shell can use the > > if [ <condition> ] > > syntax instead of the > > if test <condition> > > syntax? I'm no Bourne Shell wizard, but most of the shell scripts I > find from Unix expect the brackets. Thank you for any info, and even > flames might be appreciated. Just link test to '[' and it will work. I did not test if this is working as expected in extreme cases. -- -- Ralf Wenk -- ralf@ptavv.ka.sub.org
HBO043%DJUKFA11.BITNET@cunyvm.cuny.edu (Christoph van Wuellen) (04/29/91)
Just create a file "]" and make it a link to test. C.v.W.
jms@cs.vu.nl (Jan-Mark) (04/29/91)
In article <1991Apr27.190119.9776@doe.utoronto.ca>, david@doe.utoronto.ca (David Megginson) writes: > > Has anyone released patches so that the Minix shell can use the > > if [ <condition> ] > > syntax instead of the > > if test <condition> > > syntax? I'm no Bourne Shell wizard, but most of the shell scripts I > find from Unix expect the brackets. Thank you for any info, and even > flames might be appreciated. > From test.c: * Add Jeroen van der Pluijm 09/25/89 jeroen@minixug.nluug.nl * Enabled linking to /usr/bin/[ so you cn use structures * like: * if [ -f ./test.c ] * and so on. Also added checking of argv[0] to see if it * is '[' and the last argument if it is ']'. * So try to link /bin/test to /bin/[ or (/usr/bin/test to /usr/bin/[). It should work. If it doesn't try to get a newer test program (ie. after 09/25/89.) or even better try to get a newer MINIX version. I don't think POSIX (ie. MINIX 2.0) will like this, but that's an other problem. Jan-Mark -- (:> jms (_) ========""======