diff --git a/awk_built_in_variables.txt b/awk_built_in_variables.txt new file mode 100644 index 00000000..9e9b1865 --- /dev/null +++ b/awk_built_in_variables.txt @@ -0,0 +1,11 @@ +---------------- Table 4.3 ---------------- + awk Built-in Variables + +FILENAME name of current input file +FS field separator character (default blank & tab) +NF number of fields in input record +NR number of input record +OFMT output format for numbers (default %g; see printf(3)) +OFS output field separator string (default blank) +ORS output record separator string (default newline) +RS input record seaparator character (default newline) diff --git a/awk_operators.txt b/awk_operators.txt new file mode 100644 index 00000000..43c0defb --- /dev/null +++ b/awk_operators.txt @@ -0,0 +1,15 @@ +------------------ Table 4.4 ------------------ + awk Operators (increasing order of precedence) + += += -k *= /= %= assignment; v op= expr is v = v op (expr) +|| OR: expr1 || expr2 true if either is; + expr2 not evaluated if expr1 is true +&& AND: expr1 && expr2 true if both are; + expr2 not evaluated if expr1 is false +! negate value of expression +> >= < <= == != ~ !~ relational operators; + ~ and !~ are match and non-match +nothing string concatenation ++ - plus, minus +* / % multiply, divide, remainder +++ -- increment, decrement (prefix or postfix)