Pad all lines with spaces to a fixed width in Vim or using sed, awk, etc
Vim
:%s/.*/\=printf('%-63s', submatch(0))
$ awk '{printf "%-63s\n", $0}' testfile > newfile
In Vim, I would use the following command:
:%s/$/\=repeat(' ',64-virtcol('$'))
(The use of the virtcol()
function, as opposed to the col()
one,
is guided by the necessity to properly handle tab characters as well
as multibyte non-ASCII characters that might occur in the text.)