I am doing a find and replace using `sed` in a `bash` script. I want to search each file for words with `files` and `no`. If both the words are present in the same line then replace `red` with `green` else do nothing

```
sed -i -e '/files|no s/red/green' $file

```

But I am unable to do so. I am not receiving any error and the file doesn't get updated.

What am I doing wrong here or what is the correct way of achieving my result