miller
miller copied to clipboard
How to exit like awk?
I want to exit miller in some conditions, without processing remaining records. Just like awk's exit statement.
ex.
mlr put 'if ($month < 5) { exit 0 }; ....'
Not found in document.
The Assertions could be a alternative to exit, but they only support type-check, not value.
Should we still execute the end blocks (if any) in the put statement? For example if there are 1000 records in the input data and you did exit(0) on the 17th one.
... aha, it should be awk-like in this regard too :)
https://www.gnu.org/software/gawk/manual/html_node/Exit-Statement.html