Using conditional expressions to improve your shell scripts

You can use these very simple shell script conditional expressions to improve your home-made scripts, making them more efficient and easy to mantain. To check if a file exists and it’s executable, use: #!/bin/bash FILE=/usr/bin/passwd if [ -x $FILE ]; then echo "File $FILE exists and it is executable" else echo "File $FILE does not exists...