Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Case insensative search

Status
Not open for further replies.

columb

IS-IT--Management
Feb 5, 2004
1,231
EU
Ok, so i know enough awk to replace
Code:
command | grep word | awk '{print $1}'
with
Code:
command | awk '/word/ {print $1}'
but how do I replace
Code:
command | grep -i word | awk '{print $1}'
to do case insensative searches?

Thanks.

Ceci n'est pas une signature
Columb Healy
 
command | awk 'tolower($0)~/word/{print $1}'

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks PH - that will do fine.

Ceci n'est pas une signature
Columb Healy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top