I wanted to do some full-justification of text.
So a little
awk
later,
I could set the desired width
and pipe to justify it.
To use, first make sure to set the execute bit with
chmod +x full-justify.awk
and you can then run it with:
If a line is longer than
COLUMNS
it will end up ragged rather than reflow.
To get around this,
first use
fmt
to reformat the file to the desired width,
and then pass it to
full-justify.awk