I'm using the man page for "test". I understood everything except for the following 2 lines. Can someone give me an example of how to actually use this because thus far I've been using 1 dimensional tests (i.e. is x = y kind of thing in my tests), so comparing expressions doesn't make too much sense in my head. I think if someone can show me an example or use case I'd get it.
EXPRESSION1 -a EXPRESSION2
both EXPRESSION1 and EXPRESSION2 are true
EXPRESSION1 -o EXPRESSION2
either EXPRESSION1 or EXPRESSION2 is true
bashand used the phrase "man page fortest", so maybe you are not aware of the following:testis a builtin in Bash andhelp testin Bash describes it, butman testdescribes a standalone executable. The builtin and the executable may differ in what they support. Depending on what syntax you use and where (test,/usr/bin/test,find … -exec test …,sudo test …, …), you use one or the other. I don't think the answer to your question depends on whattestyou use, but in general it's good to knowman testdoes not describe the builtin. – Kamil Maciorowski Dec 11 '22 at 19:55