Linux Today: Linux News On Internet Time.





More on LinuxToday


How To Search Using The Awk Utility

Nov 15, 2010, 07:02 (0 Talkback[s])

WEBINAR:
On-Demand

Full Text Search: The Key to Better Natural Language Queries for NoSQL in Node.js


[ 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

Related Stories: