Sed - inserting spaces
Insert a blank line after each sentence (punctuated by a carriage return)
sed G file.txt
Insert a blank line after each sentence (punctuated by a carriage return), without taking into account the existing white lines:
sed '/^$/d;G' file.txt
Add two blank lines after each sentence (punctuated by a carriage return)
sed 'G;G' fichier.txt
Insert a blank line before each line “matched” by / pattern /"(" pattern "can be a regular expression)
sed '/Fin/{x;p;x}' file.txt
Insert a blank line after each line “matched” by / pattern /"(" pattern "can be a regular expression)
sed '/Début/G' file.txt
Insert a blank line before and after each line “matched” by / pattern /"(" pattern "can be a regular expression)
sed '/Stream EDitor/{x;p;x;G}' file.txt