BASH Shell Test If a File Is Writable or Not

Originally published at: https://www.cyberciti.biz/faq/unix-linux-shell-scripting-test-if-filewritable/

How can you test if a file is writable under UNIX / Linux bash shell scripting and programming language?