This question already has an answer here:

How do I search an entire file for a word and replace it with another word using egrep?

marked as duplicate by roaima, don_crissti, mdpc, Jeff Schaller, Rui F Ribeiro Jun 26 '17 at 22:40

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • You can't. Use something like sed instead. – roaima Jun 26 '17 at 21:26
  • @roaima, you want to make that a full answer? it would be the right one. Don' forget sed -r works with extended regular expressions like egrep. – hildred Jun 26 '17 at 21:39
  • Everyone, I want to keep this around to point users at. FAQ!. – hildred Jun 26 '17 at 21:41

Browse other questions tagged or ask your own question.