My /etc/hosts file contains following content:127.0.0.1 localhost127.0.0.1 mymachine#Host generated by script123.456.789.102 host.example1#Host generated by script123.456.789.120 host.example2How can I use sed command to remove the line with contains #Host generated by script and it's next line?
How to remove a matched line and it's next line by sed command?
sed