TECHIES WORLD

For Techs.... Techniques.... Technologies....

CpanelLinux

How to delete the line containing the keyword from a file

To delete the lines containing the specific keyword from a file in bash, use the following command.

sed -i '/KEYWORD/d' filename

 

Leave a Reply