Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
help:general_linux:linux_advanced [2016/05/18 14:04] jebailie [Linux Commands : advanced] |
help:general_linux:linux_advanced [2016/05/18 14:16] jebailie [awk] |
||
---|---|---|---|
Line 9: | Line 9: | ||
==== grep ==== | ==== grep ==== | ||
- | : | + | " |
+ | |||
+ | * Good for searching a file for a certain pattern | ||
< | < | ||
user@tim:~$ grep --help | user@tim:~$ grep --help | ||
Line 26: | Line 28: | ||
==== awk ==== | ==== awk ==== | ||
- | : | + | " |
- | : | + | * good for printing columnar data, note that the field separator (between the columns) can be anything (space, tab, colon, etc) and can be specified with -F |
< | < | ||
- | user@tim: | + | user@tim:~$ awk ' |
cat | cat | ||
dog | dog | ||
Line 38: | Line 40: | ||
==== sed ==== | ==== sed ==== | ||
- | : | + | " |
< | < | ||
user@tim:~$ sed s/cat/lion/ test.file | user@tim:~$ sed s/cat/lion/ test.file |