Differences
This shows you the differences between two versions of the page.
linux_wiki:awk [2015/03/09 22:53] billdozor |
linux_wiki:awk [2019/05/25 23:50] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Awk ====== | ||
- | **General Information** | ||
- | |||
- | AWK is a pattern scanning and processing language. | ||
- | Gawk is the GNU Project' | ||
- | |||
- | I typically stick to using gawk and in most cases, awk is a symlink to gawk. | ||
- | This page will contain useful gawk commands as I run into them. | ||
- | |||
- | **Checklist** | ||
- | * Distros: All | ||
- | * gawk installed | ||
- | |||
- | ---- | ||
- | |||
- | ===== Gsub ===== | ||
- | |||
- | gawk's gsub string function matches and replaces regular expressions. This can replace a grep | sed combination. | ||
- | <code bash> | ||
- | ~$ echo -e " | ||
- | Goodbye, friend. | ||
- | Goodbye, how are you? | ||
- | </ | ||
- | Notice that the last line "I am fine." is not displayed at all because it doesn' |