bash check file readable code example
Example: bash check if file is readable
FILE="/path/to/some/file"
if [[ -r $FILE && -w $FILE ]]; then
# do stuff
else
# file is either not readable or writable or both
fi
FILE="/path/to/some/file"
if [[ -r $FILE && -w $FILE ]]; then
# do stuff
else
# file is either not readable or writable or both
fi