I have a file `file1.txt` with the following content

```
P0000021=Result of string 21
P0000022=Result of string 22
P0000023=Result of string 23
P0000024=Result of string 24
P0000025=Result of string 25
P0000026=Result of string 26
P0000027=Result of string 27
T1000028=Result of string 28

```

and want to use some command to find a arbitrary key and get the corresponding value. E.g. if I search for `P0000024` the output should be 

```
Result of string 24

```

I tried using `grep` like this:

```
grep '"P0000024"=' file1.txt | cut -d'=' -f2 > result.txt

```

However it does not give the expected result.