moved tables from unix programming interface book into its own directory
This commit is contained in:
parent
a7e1891218
commit
71091f5647
3 changed files with 0 additions and 0 deletions
15
unix_programming_environment/awk_operators.txt
Normal file
15
unix_programming_environment/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)
|
||||
22
unix_programming_environment/grep_egrep.txt
Normal file
22
unix_programming_environment/grep_egrep.txt
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
----------------- Table 4.1 -----------------
|
||||
--- grep and egrep Regular Expressions ---
|
||||
(decreasing order of precedence)
|
||||
|
||||
c any non-special character c matches itself
|
||||
\c turn off any special meaning of character c
|
||||
^ beginning of line
|
||||
$ end of line
|
||||
. any single character
|
||||
[...] any one of characters in ...; ranges like a-z are legal
|
||||
[^...] any single character not in ...; ranges are legal
|
||||
\n what the n'th \(...\) matched (grep only)
|
||||
r* zero or more occurrences of r
|
||||
r+ one or more occurrences of r (egrep only)
|
||||
r? zero or one occurrences of r (egrep only)
|
||||
r1 r2 r1 followed by r2
|
||||
r1|r2 r1 or r2 (egrep only)
|
||||
\(r\) tagged regular expression r (grep only); can be nested
|
||||
(r) regular expression r (egrep only); can be nested
|
||||
|
||||
No regular expression matches a newline.
|
||||
|
||||
22
unix_programming_environment/sed.txt
Normal file
22
unix_programming_environment/sed.txt
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
----------------------------- Table 4.2 -----------------------------
|
||||
Summary of sed Commands
|
||||
|
||||
a\ append lines to output until one not ending in \
|
||||
b label branch to command : label
|
||||
c\ change lines to following text as in a
|
||||
d delete line; read next input line
|
||||
i\ insert following text before next output
|
||||
l list line, making all non-printing characters visible
|
||||
p print line
|
||||
q quit
|
||||
r file read file, copy contents to output
|
||||
s/old/new/f substitute new for old. If f=g, replace all occurrences;
|
||||
f=p, print; f=w file, write to file
|
||||
t label test: branch to label if substitution made to current line
|
||||
w file write line to file
|
||||
y/str1/str2 replace each character from str1 with corresponding
|
||||
character from str2 (no ranges allowed)
|
||||
= print current input line number
|
||||
!cmd do sed cmd only if line is not selected
|
||||
: label set label for b and t Commands
|
||||
{ treat commands up to matching } as a group
|
||||
Loading…
Add table
Add a link
Reference in a new issue