Back to the learning path

test

test; [ is another name for it Command details
Step 1/1: Conditions

test COND (also written [ COND ]) answers with its exit status: -f file, -d directory, -e exists, -z empty string, -eq equal numbers. Combine it with &&, || and if.

$ test -d logs && echo yes
Fundamentalstest
Check whether it exists
Use test to check whether notes.txt is a directory: print yes if so, no otherwise.
bcNext lesson:true