<p>I have uncovered another problem in the effort that we are making to port several hundreds of ksh scripts from AIX, Solaris and HPUX to Linux. See <a href="https://stackoverflow.com/questions/74372/how-to-overcome-an-incompatibility-between-the-ksh-on-linux-vs-that-installed-o">here</a> for the previous problem.</p>

<p>This code:</p>

<pre><code>#!/bin/ksh
if [ -a k* ]; then
    echo "Oh yeah!"
else
    echo "No way!"
fi
exit 0
</code></pre>

<p>(when run in a directory with several files whose name starts with k) produces "Oh yeah!" when called with the AT&amp;T ksh variants (ksh88 and ksh93). On the other hand it produces and error message followed by "No way!" on the other ksh variants (pdksh, MKS ksh and bash).</p>

<p>Again, my question are: </p>

<ul>
<li>Is there an environment variable that will cause pdksh to behave like ksh93? Failing that:</li>
<li>Is there an option on pdksh to get the required behavior?</li>
</ul>

You do realize that [ is an alias (often a link, symbolic or hard) for
```
/usr/bin/test
```
, right?  So perhaps the actual problem is different versions of
```
/usr/bin/test
```
?
OTOH, ksh overrides it with a builtin.  Maybe there's a way to get it to not do that?  or maybe you can explicitly alias [ to
```
/usr/bin/test
```
, if
```
/usr/bin/test
```
on all platforms is compatible?