There isn't much documentation on fish. I need to know if
date '+%k' is greater than 8
How do I do it? Thanks.
You can use the test
fish builtin, like:
if test (date +%k) -gt 8
...
end
test
or [
are the way you would do this. This is true of all shells, since these are external commands.
if [ (date '+%k') -ge 8 ]
echo "It's larger!"
end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With