Popular `sed` terminal commands
Delete all lines that contain a specific string from a text file
Deletes all lines from a text file that contain a specific string. Pass the `-i` flag to modify the file in place.
Authored by: SiegeX
Delete empty lines in a file
Deletes all lines that contain only whitespace from a file.
Authored by: Kent
Insert a line at a specific line number
Inserts a line of text into a specific line number of a file using sed. The `-i` flag indicates the file is modified in place.
Authored by: glenn jackman
Print the nth line of a file
Uses sed to print the the the nth line of a file. This is faster than most other solutions since `NUMq` immediately quits when the line number is hit.
Authored by: anubhava
Recursively find and replace within a directory
Replaces all occurrences of a string recursively within a directory
Authored by: Anatoly