I have a problem with filling out a text. I have different lenghts in a file and would like to see that all the lines becomes the same length by putting a zero in front off the line.
awk 'BEGIN {m=0} {a[NR]=$0;if (m<length($0)){ m=length($0)}} END { for (x in a) { if (length(a[x])<m) { for (i=length(a[x]);i<m;i++) { printf "0" } } print a[x] }} ' file
# more file
5432
233
3455
44322332423
# python -c 'data=open("file").read().split();print "\n".join([ i.zfill(max(map(len,data))) for i in data ])'
00000005432
00000000233
00000003455
44322332423