---

How To Search Using The Awk Utility

[ Thanks to Andrew
Weber
for this link. ]

“You can do searches with awk by enclosing the search
within forward slashes. Note awk is case sensitive. /Debian/ If you
wanted to search for the strings “debian” and “Debian” you could
use a regular expression.

/[Dd]ebian/

“You take those searches and look for the text string at the
start of the line, “^” or the end of the line “$” like this:

/^Debian/
/Debian$/

“If you were looking for lower case letters d-m your search
would look like this:”

Complete
Story

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends, & analysis