When I type this in the terminal
test 4 -lt 6
I don't get any output. Why not? I need that 0 or 1
|
You get 0 or 1. In the exitcode.
Update: To store the exitcode for later use, just assign it to a variable:
|
|||||||||||||||||
|
If you want the result of a comparison on standard out instead of an exit code, you can use the
Two things to note:
|
|||||||||
|
Another way is
But be careful in that case. If |
|||
|