Search comments in addition to IPs and hostnames. Call grep twice, excluding commented lines first before searching.
Backslash is literal, so explicitly escape it rather than rely on fallback behavior. ShellCheck SC1117 https://github.com/koalaman/shellcheck/wiki/SC1117
Braces are only required in certain cases, but the cognitive overhead in keeping track of which cases require braces can be reduced by simply always using them. Example: `${NAME}` Retain more widely-used braces `$NAME` convention in documentation.