in reply to Re: How do I test whether or not a file is writable?
in thread How do I test whether or not a file is writable?

There's no point testing for both -f and -w. If the file doesn't exists (or if its existence cannot be determined), -w will return false. And if -w returns true, the file exists.

Replies are listed 'Best First'.
Re^2: Answer: How do I test whether or not a file is writable?
by clinton (Priest) on Mar 18, 2010 at 16:41 UTC
    Yes, but -w would also return true if the file is actually a writeable directory