Hi,
I am facing a below problem. Inorder to mak sure the below file is fixed width i am using the following command
awk '{printf("%-375s\n", $0) }
so as to add trailing spaces at the end for records of length less than 375.
Input file > inp.txt
1�1234
1234
123�1
The output file is fixed with of expected length but the data after the � is getting lost is getting padded spaces.
Output:
1<space till 375>
1234<space till 375>
123<spacetill 375>
Can you please let me know as to how to avoid this and of there is a better way to make the records in a file fixed width?