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 bet there is plenty of code out there that tries to decide 
whether it is safe to create a file and would fall foul of an errant dead 
symbolic link.

A little off topic but are -a and -e identical?

Cheers,
mark

Reply via email to