If I have a text file that looks like this:
this is the first line
line 2 is this
line 3
this is another line of this test file
I'd like to add blanks at the end of each line to make them all the same length. Let's say I want each line to be exactly 125 bytes long. That is, I want the end of line marker (hex "0a") to be moved to column 126. Each line in the file needs to padded with blanks and end up with the same number of bytes -- 125. Can this be done on a script with some unix command or sed command? Thank you for your help.
this is the first line
line 2 is this
line 3
this is another line of this test file
I'd like to add blanks at the end of each line to make them all the same length. Let's say I want each line to be exactly 125 bytes long. That is, I want the end of line marker (hex "0a") to be moved to column 126. Each line in the file needs to padded with blanks and end up with the same number of bytes -- 125. Can this be done on a script with some unix command or sed command? Thank you for your help.