scripts/scripts/text/mid.awk

6 lines
94 B
Awk

{ z = col - length
y = int(z / 2)
x = z - y
printf "%*s%s%*s\n", x, "", $0, y, ""
}