And Why Not?
Neatening Text with fmt
Alternatives to fmt
recomment: Clean Up Program Comment Blocks
Remove Mail/News Headers with behead
Low-Level File Butchery with dd
offset: Indent Text
Centering Lines in a File
Splitting Files at Fixed Points: split
Splitting Files by Context: csplit
Hacking on Characters with tr
Converting Between ASCII and EBCDIC
Other Conversions with dd
Cutting Columns or Fields with cut
Cutting Columns with colrm
Make Columns Automatically with cols
Making Text in Columns with pr
Pasting Things in Columns
Joining Lines with join
Quick Reference: uniq
Using IFS to Split Strings
Straightening Jagged Columns
There are many specialized forms of editing that happen frequently enough that they sometimes want to be saved into a script. Examples of this kind of thing include:
and for reformatting jagged lines into neat paragraphs.
, a script for reformatting comment blocks within programs and scripts.
, a script for removing the headers from mail and news messages.
, a script for centering lines of text in a file.
In addition, there are a number of programs that provide some useful ways of modifying files but that you don't normally think of as editors:
and let you split a big file into smaller pieces.
lets you substitute one character for another - including non-printing characters that you specify by their octal values.
lets you perform various data conversions on a file.
and let you cut columns or fields out of a file, and lets you put them back, perhaps in a different order.
This chapter covers all that and more.