Let's say I have this simple code:
echo "Are there any arguments?"
if [ $# -eq 0 ]; then
echo "false"
else
echo "true"
fi
As you can see it would be better to just have opportunity to directly print condition result, but I don't know how to do it.
It would be something like:
echo "$([ $# -eq 0 ])"
But it doesn't work that way. Can we do this without if
?