Dave & John, thank you both.
I think you are both right that my solution is
[ -a file -o -h file ] || echo "ok to create file"
However I personally feel that there ought be a simple test for this situation,
there are still a few spare letters that could be used for the test ;)
I'm willing to be
Hi,
I stumbled into discovering that the -e test for a file does not report the
file as existing if the file is a dead symbolic link. This seems wrong to me.
Here's some test code:-
(WARNING it includes rm -f a b)
#!/bin/bash
bash --version
echo ""
rm -f a b
ln -s b a
[ -a a ] && echo "1. (te