How Do I Remove a Specific Line in Unix?
Contents the Syntax Is; Where Can Be Either a Single Line Like 5 or a Range of Lines Like 5,10, and the Command D Deletes the Given Line or Lines. the...
Contents
The syntax is
How do I delete a specific line in Unix?
To Remove the lines from the source file itself, use the -i option with sed command. If you dont wish to delete the lines from the original source file you can redirect the output of the sed command to another file.
Must Read
How do I remove a specific string in Linux?
Use the grep command to delete the line containing the specified string. Grep command, we use it more to match the specified string in the text file. Since it can be matched, it can also be excluded, you need to use the grep -v option.