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 for **** 1

Status
Not open for further replies.

ianicr

IS-IT--Management
Nov 4, 2003
230
GB
I have a file and some lines have ******* in the line. I want to remove these lines. to remove lines normally I would use grep -v whatever filename
how do I do a grep for ****
I've tried grep -v "***" and grep -v '****' but this doesn't work.
Thanks
 
grep -v '\*\*\*\*'

using back-slash to make the star a literal
 
Cheers. Knew it was something like that but couldn't remember. Have a Star!
 
Or you could just use fgrep which just searches for fixed strings (none of the regular expression chars are special)


--
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top