User Tools

Site Tools


sed:file_spacing:double_space_a_file_which_already_has_blank_lines_in_it

SED - File Spacing - Double space a file which already has blank lines in it

Output file should contain no more than one blank line between lines of text.

sed '/^$/d;G' filename

Example

Running that command again this file:

testfile
aaa
 
bbb
ccc

returns:

testfile
aaa
 
bbb
 
ccc
sed/file_spacing/double_space_a_file_which_already_has_blank_lines_in_it.txt · Last modified: 2020/08/15 10:43 by 192.168.1.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki