Hi guys I need help using linux script.

This is a sample input:

`Login=Testtt/123
Password=Testtt/123
Login=eJwQwq12
Password=OjeEor/Kd`

First I searched the pattern using grep then awk using the following code

`passStr=grep 'Passsword' test.param | awk -F= '{print $2}'`

So there I got the Testtt123 then put it into the variable using passStr.

Then I put the replacement string into another variable using

`passNew=ThisIsATest=`

Now I need to replace the second occurrence of string called Testtt123 which is in `passStr` and replace it into `ThisIsATest=` using the variable `passNew`

I only have this code but it replaces all occurrence of the string.

`sed /$passStr/{s/$passStr/$passNew/} test.param`

The problem here is that the second occurrence lies on different lines.
There are other occurences of Password which makes it hard for me to use awk because the passStr will have two possible values. I only need the first Password.

Next is that there are times in which the value of the Password contains slashes.(changed the sample input)

The output should go like

`Login=Testtt123
Password=ThisIsATest=
Login=eJwQwq12
Password=OjeEor/Kd`

Any help I can get?