3 ms·
>All of test(1) as you can use them in any if statement (/usr/bin/[ is a real command!): Yes, and not only in an if statement. You can also use test or [ comma
by vram22 9y ago
>All of test(1) as you can use them in any if statement (/usr/bin/[ is a real command!):
Yes, and not only in an if statement. You can also use test or [ command in commands of the form:
test condition && commmand2
or
test condition || command2
which will only work if the condition is true or false, respectively (IIRC, need to check this).
- SEJeff 9y agoThat is correct, no need to check on this. I've done this for years :)
- vram22 9y agoThanks. Well, I was nearly 100% sure too (been using Unix for years too (from before Linux was created)), but "nearly" is not 100% (since I don't use that feature often), and don't like to make claims I am not sure about without a disclaimer, hence I made one :)