I'm stuck with requirement where I have to replace first occurrence keyword{as well as whole line} with value x and 2nd occurrence with value Y. For example

1. sudo docker push IP:PORT/ABC:1
2. sudo docker push IP:PORT/XYZ:1

In above case, I would select using keyword "sudo docker push" and replace 1st occurrence whole line with `sudo docker push IP1:PORT/ABC:1` and 2nd occurrence whole line with `sudo docker push IP2:PORT/ABC:1`.

I have tried following combinations but nothing has worked until now :

```
sed -i "s,old-word,new-word," file-name
sed -i "<occurence-number> s,old-word,new-word,g" file-name
sed -i " s,old-word,new-word,<occurence-number>g" file-name
sed "<occurence-number>,old-word,{s,old-word,new-word,}" file-name

```