copied awk tables from unix programming environment book
This commit is contained in:
parent
06857b7619
commit
2f4bd3a309
2 changed files with 26 additions and 0 deletions
11
awk_built_in_variables.txt
Normal file
11
awk_built_in_variables.txt
Normal file
|
|
@ -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)
|
||||
15
awk_operators.txt
Normal file
15
awk_operators.txt
Normal file
|
|
@ -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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue