fun linux fact:
the `if` shell built-in just executes the command you give it and looks at its exit code

so how can you do stuff like `if [ $a -gt 10 ]`?

well, [ is just a program usually in /bin/[ that takes the arguments ($a, -gt, 10, ]) and returns an exit code accordingly

this is also why you need the spaces between everything as well as quoting - they're ordinary arguments and need to be provided as such

also note that many shells do actually have similar shell built-ins such as [[ ]] and (( )), which are not stand-alone programs like [ is

0

If you have a fediverse account, you can quote this note from your own instance. Search https://infosec.exchange/users/rebane2001/statuses/116199994300613385 on your instance and quote it. (Note that quoting is not supported in Mastodon.)