HAS is Home Accounting System written in AT&T AWK Copyright (C) 2008 Matous J. Fialka, Released under the terms of The MIT License DESCRIPTION This program parses input data and produces output while performing basic arithmetical expressions as it is described in the next sections of this document. USAGE $ has.awk [ filename [ filename ... ] ] SYNTAX ::= | ::= [ | ] [ ] ::= operator ::= variable ::= constant ::= ":" [ ] ::= anything OPERATORS Answer: ? get answer or get value if variable specified ! set answer or get value if variable specified = get answer and reset it to 0 Arithmetics: + add - substract x multiply / divide % percent Default operator is the `+' operator. If operator is not specified in the beginning of a line and the line begins with blank character(s) last operator used is used. Multiple blank lines are squeezed into single one. Everything else is just printed out and formated to 72 characters wide paragraphs. Althought this program is quite usable as it is now keep in mind that it is also proof of concept only and that the syntax may change in the future. Also notice that the output stream can be parsed again so that you will obtain exactly the same output. Therefor next program call will still work as expected: $ has.awk test.has | has.awk | has.awk | has.awk | has.awk | less If you like to colorize your HAS output use the HASColorize SED script provided like this: $ has.awk test.has | hascolorize.sed | less -R See and play with the `test.has' file to know more about this program.