scripts/text/mid.awk

7 lines
88 B
Awk

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