Replace complete line with sed

I'm looking to replace this content:

#hosts: ["localhost"]

For this one:

hosts: ["192.168.1.3:5044"]

The blank space at line's first is giving me issues.

Thanks.



Read more here: https://stackoverflow.com/questions/64954747/replace-complete-line-with-sed

Content Attribution

This content was originally published by Javier S at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: