- Learning AWK Programming
- Shiwang Kalkhanda
- 59字
- 2021-08-27 19:49:54
Pattern-only statements
The syntax of the awk command with a pattern only is as follows:
awk '/ pattern /' inputfilename
In the given example, all lines of the empinfo.txt file are processed, and those that contain the Jane pattern are printed:
$ awk '/Jane/' empinfo.txt
Jane 9837432312 jane@gmail.com hr 1800 5