OMG, `%%1` because `sformat` uses it twice.

Anyway, we will rewrite it for different reasons. If it is hard to mock, then we should make it testable by extracting a function like this:

```cpp
    string HostnameFromGetentOutput(string) { ... }

    string command = sformat("/usr/bin/getent hosts \"%1\", ip);
    string stdout = SCR::Execute(.target.bash_output, command)["stdout"]:""; 
    string hnent = HostnameFromGetentOutput(stdout);
```