dcsimg
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

How to Help Your Business Become an AI Early Adopter


[ 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:


×
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.