Answers for "bash check if file is readable"

0

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
Posted by: Guest on February-16-2021

Code answers related to "bash check if file is readable"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language