On Thu, Jul 21, 2016 at 03:38:40PM -0600, Bob Proulx wrote: > The original option letter used by test to check for the presence of a > symlink was -h. I don't know why. But in those days the only test > option to test for a symlink was -h. The -L came later. This legacy > is still visible in the HP-UX test man page for example. No -L > documented there. > > http://nixdoc.net/man-pages/HP-UX/man1/test.1.html
The -L option of test(1) actually does work, despite this: imadev:~$ ls -l symlink lrwxr-xr-x 1 wooledg pgmr 8 May 3 2012 symlink -> notafile imadev:~$ /bin/test -L symlink; echo $? 0 imadev:~$ uname -a HP-UX imadev B.10.20 A 9000/785 2008897791 two-user license The HP-UX Bourne shell requires the -h option though: imadev:~$ /usr/old/bin/sh -c 'test -L symlink; echo $?' /usr/old/bin/sh: test: argument expected imadev:~$ /usr/old/bin/sh -c 'test -h symlink; echo $?' 0