Shell Scripting Question:
How do you test for file properties in shell scripts?
Answer:
-s filename tells you if the file is not empty, -f filename tells you whether the argument is a file, and not a directory, -d filename tests if the argument is a directory, and not a file, -w filename tests for writeability, -r filename tests for readability, -x filename tests for executability
Previous Question | Next Question |
How do you do number comparison in shell scripts? | How do you do Boolean logic operators in shell scripting? |