Bash Scripting - Conditionals
Identify the error in this bash snippet:
if [-r file.txt]; then echo "Readable"; fi
if [-r file.txt]; then echo "Readable"; fi
[ and before ]. The snippet lacks spaces: if [-r file.txt]; is invalid.if [ -r file.txt ]; then with spaces.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions