User Tools

Site Tools


sed:align:align_all_text_flush_right_on_a_79-column_width

SED - Align - Align all text flush right on a 79-column width

sed -e :a -e 's/^.\{1,78\}$/ &/;ta'  # Set at 78 plus 1 space.

Example

Running that command again this file:

testfile
aaa
bbb
ccc

returns:

testfile
                                                                            aaa
                                                                            bbb
                                                                            ccc
sed/align/align_all_text_flush_right_on_a_79-column_width.txt · Last modified: 2020/08/16 11:49 by 192.168.1.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki