Which Command Will Delete the Lines Containing the Pattern This from the File in Unix?
Contents Sed Command to Delete Lines: Sed Command Can Be Used to Delete or Remove Specific Lines Which Matches a Given Pattern or in a Particular Position in a...
Contents
Sed Command to Delete Lines: Sed command can be used to delete or remove specific lines which matches a given pattern or in a particular position in a file.
How do I delete a line in Linux?
Deleting a Line
- Press the Esc key to go to normal mode.
- Place the cursor on the line you want to delete.
- Type dd and hit Enter to remove the line.
19 июл. 2020 г.
Which vi command deletes the current line?
To Delete Text:
| Command | Action |
|---|---|
| dd | delete current line |
| 5dd | delete 5 lines starting with the current line |
| dL | delete through the last line on the screen |
| dH | delete through the first line on the screen |