The commands in this section do bulk modification of the contents of text files. They are intended for work on data files (output from spreadsheets, databases, etc.), rather than regular natural language text. In general, these commands can
chop files horizontally or vertically
sort the file contents
compress or expand spaces in a file
reformat the file to a new width
A delimiter is a character (e.g., a space, a colon, a bar, or just about anything else) that indicates the end of a word. For example, the space is one delimiter for regular English sentences. The colon (":") is the delimiter for the /etc/passwd file.
If you're looking for something more along the lines of a general purpose editor of text files, see Chapter 20.
column | Format input into columns. |
colrm | Remove the specified columns. |
csplit | Split file into sections. |
cut | Remove the specified columns from a file. |
expand | Expand tabs into spaces. |
fmt | Format file to a specified width. |
fold | Format file to a specified width. |
merge | Merge two descendants of a file. |
paste | Merge files horizontally. |
sort | Sort file contents. |
split | Break big files into smaller files. |
tr | Translate characters. |
unexpand | Compress spaces into tabs. |
uniq | Segregate duplicate lines within a file. |