posix me harder

Martin Pool mbp at samba.org
Thu Mar 14 14:49:08 GMT 2002


> This does not demonstrate that test(1) is broken.

I should have left off the '(1)'.

Apparently different systems support different options.  I suppose the
best portable test for symlinks will be

if test -L "$f" || test -h "$f" || /bin/test -L "$f" || /bin/test -h "$f" 
then
	echo is a link
fi

--
Martin




More information about the samba-technical mailing list