From Martin Maechler <maechler@stat.math.ethz.ch>  Thu Dec 10 15:35:32 1998
From: Martin Maechler <maechler@stat.math.ethz.ch> (Martin Maechler)
Date: Thu, 10 Dec 1998 16:35:32 +0100
Subject: [R & Unix ..] system("test",...)  gives funny results...
In-Reply-To: <x2zp8w6p1m.fsf@blueberry.kubism.ku.dk> (message from Peter
 Dalgaard BSA on 10 Dec 1998 15:37:41 +0100)
Message-ID: <199812101535.QAA17618@sophie.ethz.ch>

Peter Dalgaard provided the solution:

1) system(.) always uses /bin/sh  -- not regarding $SHELL or anything

2) On Solaris 2.5.1,  the /bin/sh builtin 'test'  doesn't work as expected
   as expected with  "test -e  file" :

    sophie{maechler}654> uname -a
    SunOS sophie 5.5.1 Generic_103640-08 sun4u sparc SUNW,Ultra-1

    sophie{maechler}655> /bin/sh

    $ test -e /tmp
    test: argument expected
    $ touch /tmp/q
    $ test -e /tmp/q
    test: argument expected
    $ test -d /tmp; echo $?
    0
    $ test -d /Tmp; echo $?
    1

[still interested to hear about the potential of an R builtin 'test',
 relying on GNU sh-utils].

--
Martin
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[R & Unix ..] system("test",...) gives funny results...
Martin Maechler