thanks for reading.

I have a plain text file with some simple user information

The thing is, sometimes one of those items is missing.

Notice how Norman and Reggie show an email addr, but Missy doesn't:

```
Name: Norman Normalrecord
Email: norman@ooga.com
Addr: 123 Main street

Name: Missy Missington
Addr: 789 Back street

Name: Reggie Regularrecord
Email: reggie@booga.com
Addr: 456 Middle street

```

I would like to grep / sed and say "If no email address is found, substitute with the text missing\_email\_addr", so I get this result :

```
Norman Normalrecord
norman@ooga.com
123 main street

Missy Missington
MISSING_EMAIL_ADDR
789 back street

Reggie Regularrecord
reggie@booga.com
456 middle street

```

The problem is, in all my experiments when nothing is found grep / sed produce absolutely nothing, so I can't even do a second pass to global-replace.

What I dream of is something like (obviously pseudo-grep) that provides what to print when a search doesn't find anything :

```
grep /Name:/MISSING_NAME/email:/MISSING_EMAIL_ADDR/Addr:/MISSING_STREET_ADDR/

```

Is there any way to do something like this? Thanks again.