User Tools

Site Tools


ubuntu:file:delete_a_line_that_matches_a_pattern

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
ubuntu:file:delete_a_line_that_matches_a_pattern [2020/07/15 09:30] – external edit 127.0.0.1ubuntu:file:delete_a_line_that_matches_a_pattern [2022/06/13 10:21] (current) – removed peter
Line 1: Line 1:
-====== Ubuntu - File - Delete a line that matches a pattern ====== 
- 
-<code bash> 
-sed '/someword/d' /tmp/data.txt > /tmp/output.data.txt 
-</code> 
- 
----- 
- 
-===== Edit files in place ===== 
- 
-<code bash> 
-sed -i '/someword/d' /tmp/data.txt 
-</code> 
  
ubuntu/file/delete_a_line_that_matches_a_pattern.1594805433.txt.gz · Last modified: 2020/07/15 09:30 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki