14.E: Piping with | | 14: File Utilities | 14.C: Redirecting I/O |
On the last page we used the redirect output symbol > and the cat command to place output into a designated file. We now introduce the symbol >> which appends to a designated file, that is, sends the output to the end of a file.
To add the file README.first to old.text,
> cat README.first >> old.text
Now use head to view the file. (Quiz)
The redirection symbols are versatile and powerful, and you should be able to find many uses for them. When you first experiment with them, you may want to backup your files to avoid accidental loss.
Next we talk about piping, which is a close cousin of redirection.
14.E: Piping with | | 14: File Utilities |