Tutorial by Examples

Given a file file.txt with the following content: line 1 line 2 line 3 You can delete a line from file content with the d command. The pattern to match is surrounded with default / delimiter and the d command follows the pattern: sed '/line 2/d' file.txt The above command will output: l...

Page 1 of 1