Here's an awk
script, written by Greg Ubben,
that centers lines across an 80-character line.
If your system understands
this script will be passed directly to awk
without a shell.
put this into a Bourne shell script (44.14
printf "%" int(40+length($0)/2) "s\n", $0
For each input line, the script builds a printf
with a width specification (like
that's just wide enough to center the line.
, you can use a
command to center lines while you're editing.
Or just use center
from the command line.
center afile > afile.centered
sort party_list | center | lp