[Orca-dev] Re: /bin/sh and rotate_orca_graphs

Blair Zajac blair at orcaware.com
Wed Jun 5 11:04:58 PDT 2002


Marty Leisner wrote:
> 
> In solaris 2.8 /bin/sh, it seems the syntax
> test ! -e <directory>
> is not valid...it says...
> 
> + test /home/mleisner/public_html = /home/mleisner/orca-archive
> + test ! -e /home/mleisner/orca-archive/2002-06-05
> ./rotate_orca_graphs: test: argument expected
> 
> It works without a problem with bash.
> 
> ksh also seems to work.

Thanks for pointing this out.

Probably the best solution is to change the test program to
use instead of the shell to use, since not all systems have bash
or ksh.

if test ! -e $ARCHIVE_DIR/$DATE; then

to

if /bin/test ! -e $ARCHIVE_DIR/$DATE; then

I tested this (not the script, use the test portion) on Solaris 2.6
and Solaris 2.8 and it works fine.

Best,
Blair

-- 
Blair Zajac <blair at orcaware.com>
Web and OS performance plots - http://www.orcaware.com/orca/



More information about the Orca-dev mailing list