[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Platform independant shell test
From: |
Paul D. Smith |
Subject: |
Re: Platform independant shell test |
Date: |
Tue, 12 Apr 2005 13:51:07 -0400 |
%% Jason Pearce <address@hidden> writes:
jp> if [ -e amdtest-cfg.do ]; then \
jp> Whats the trick with Solaris? Thanks.
What version of Solaris? The -e option to "test" is not portable to
older versions of UNIX. Also (as on Solaris) some /bin/sh shells have
"test" as a builtin and those builtins don't support it.
You can use -f instead, if the thing you're looking for is going to be a
file. Or, you can use -r if you know it's readable. Those are both
more portable.
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://make.paulandlesley.org
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist