Often when writing for the bash shell, one needs to test if a file (or Directory) exists (or doesn\'t exist) and take appropriate action. Most common amongst these test are
This seems to work (notice the double brackets):
#!/bin/bash if [[ -fwd "/Library/Application Support" ]] then echo 'YES SIR -f -w -d are fine' else echo 'no -f or -w or -d for you' fi