HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
cancel
Showing results for 
Search instead for 
Did you mean: 

Search for wild cards

 

Search for wild cards

How to Search for wildcard strings in a single file or multiple files.
3 REPLIES
Oviwan
Honored Contributor

Re: Search for wild cards

Hey

#cat filename | grep sting1*string2

Regards
Arturo Galbiati
Esteemed Contributor

Re: Search for wild cards

Hi,
grep -e "*" -e "?" fileA fileB ... fileZ

where wild cards are:
*
?

feel free to add ant wildcards you need eclosed in double quote.

i.e:
grep -e "*" -e "?" fileA fileB
fileA:hotmail*.com
fileA:hp?.com
fileB:*somebody@xyz.com

HTH,
Art

Re: Search for wild cards

Thanks Folk !!!!!!!!!