Adding and Deleting White Space
There are a lot of ways to change the amount of white space (space and tab characters) in a line:
- Berkeley systems have cat -s () to replace sets of two or more blank lines with single blank lines. If you don't have cat -s or need something different, look at article .
- The crush () script removes all blank lines.
- Use doublespace and triplespace () to double- and triple-space text.
- The pushin () script replaces multiple white space characters with a single space. This can shorten long lines.
- You can use sed to indent lines of text before printing (). The offset () shell script does that more easily.
- For other jobs, utilities like awk () and sed () will probably do what you want. You have to understand how to program them before you use them.
- JP