AWK is a powerful filter DSL used for data extraction and reporting. Its fundamental structure is a set of matches and corresponding actions. It boils down, almost, to a set of if-thens based on the input stream. When you match THIS expression, do THAT. If you've ever done ladder logic, it seems kind of like that.
PATTERN {ACTION} PARAMETER-ASSIGNMENTS 'FILENAME'
There are shorter forms, since the condition defaults to "always", action defaults to "print the line", and parameters have defaults, so this short form means "cat":
'MYFILE'
Original Intent
"a tool that would easily manipulate both numbers and strings" and search for patterns in data.
AWK-8 ?
X16 Awk would be a stripped-down AWK. I think it can still be useful and even interesting to have tools that can do file tests, streaming filters, and report building.
Reading through several introductions to AWK, here are the features I think might work in a non-shell 8-bit Commodore setting:
PATTERNS
1 as the default pattern.
Expression evaluating to non-zero.
String matching.
Range matching?
ACTIONS
"print($0)" as the default Action.
A list of semicolon-terminated expressions.
EXPRESSIONS
RS (record separator). Integer. Default is \n.
FS (field separator). Char or char*. Default is \s.
NF: number of fields in the current record.
NR: current record number. Starts at 1.
$0 as the current record.
$1..$9 as the fields in the current record.
A reasonable stash of general purpose variables.
Integer arithmetic.
Integer comparison.
Symbol table (hashtable) operations.
Various library of function calls (like print). As many as you can fit into the binary.