It is possible to use sed command to remove specific line which match desired pattern
https://www.gnu.org/software/sed/manual/sed.html
sed Command Usage
$ cat a.txt
ip:111.111.111.111 text text text
ip:222.222.222.222 text text text
ip:333.333.333.333 text text text
ip:444.444.444.444 text text text
# Remove the line in file and print file with STDOUT
$ sed '/222.222.222.222/d' a.txt
ip:111.111.111.111 text text text
ip:333.333.333.333 text text text
ip:444.444.444.444 text text text
# Remove the line in file and modify the file
# In macOS --> sed -i '' '/222.222.222.222/d' a.txt
$ sed -i '/222.222.222.222/d' a.txt
$ cat a.txt
ip:111.111.111.111 text text text
ip:333.333.333.333 text text text
ip:444.444.444.444 text text text
It is possible to use
sedcommand to remove specific line which match desired patternhttps://www.gnu.org/software/sed/manual/sed.html
sedCommand Usage