User Tools

Site Tools


linux:sed

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux:sed [2019/12/10 10:44] peterlinux:sed [2019/12/10 20:50] (current) – removed peter
Line 1: Line 1:
-====== Linux - SED ====== 
  
- 
-[[Linux:SED:Remove all blank lines from a file|Remove all blank lines from a file]] 
- 
-[[Linux:SED:Remove all leading and trailing whitespace from a file|Remove all leading and trailing whitespace from a file]] 
- 
-Remove all leading and trailing whitespace from end of each line: 
- 
-<code bash> 
-cat input.txt | sed 's/^[ \t]*//;s/[ \t]*$//' > output.txt 
-</code> 
- 
- 
-[[Linux:SED:Remove all whitespace (including tabs) from string|Remove all whitespace (including tabs) from string]] 
- 
-[[Linux:SED:Remove all whitespace (including tabs) from beginning of string|Remove all whitespace (including tabs) from beginning of string]] 
- 
-[[Linux:SED:Remove all whitespace (including tabs) from end of string|Remove all whitespace (including tabs) from end of string]] 
linux/sed.1575974673.txt.gz · Last modified: 2020/07/15 09:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki