Changes

Jump to navigation Jump to search
107 bytes added ,  13:43, 25 September 2023
m
Line 45: Line 45:  
  sed -n -e 5,8p -e 10p file
 
  sed -n -e 5,8p -e 10p file
   −
== Remove empty lines ==
+
==Remove empty lines==
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
sed '/^$/d'
+
sed -i '/^$/d' file.txt
 +
</syntaxhighlight>
 +
 
 +
== Remove white spaces ==
 +
<syntaxhighlight lang="bash">
 +
sed -e 's/^[ \t]*//'
 
</syntaxhighlight>
 
</syntaxhighlight>

Navigation menu