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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

grep challenge 1

Status
Not open for further replies.

hokky

Technical User
Nov 9, 2006
170
AU
Hi,

just trying to find in file *20070312.csv
the pattern ignore case "com*-asx" in linux redhat

trying :
grep -ei "com*-asx" *20070312.csv

doesn't work ? any idea ? should be simple but just couldn't get my head around.

thanks.
 
m* means any number of m characters.

If you just mean com followed by anything followed by -asx, you should use com.*-asx

Annihilannic.
 
just add a dot:

grep "com.*-asx"

an asterisk by itself means any number of
occurances of the previous character;
in this case, "m".
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top