I have a file with different record length. The file as to be converted into fixed length by appending spaces at the end of record. The length should be calculated based on the record with maximum length in the file.
If the length is less than the max length, the spaces should be appended before the new line character of that record.
Input File:
123
12345
1234
Output file:
123
12345
1234
Here the max record length is 5