![]() |
|
![]() |
![]() |
![]() |
>>
On the last page we made use of the <
symbol and the
cat
command. We will now introduce another symbol,
<<
which stands for append standard output to. This symbol is
very similar to the redirect standard output symbol, except that instead of
creating a new file (or erasing an existing one) it adds the text to the end
of the file.
While this symbol has many uses we will once again show it in combination with
the cat
command. To add README.first to the
text.old file, simply use Readme.first as the input file
and text.old as the appended file.
> cat README.first >> old.text
Use the head
command to view the file. (Quiz)
Review the head
command
The cat
command and the redirection symbols are very versatile and
powerful commands that you will find many uses for in Unix. For additional
ideas on how to use the cat
command see your man
pages. For additional ideas on redirection, let your imagination and your
neighbors be the guide. If you are experimenting with redirection, be careful
not to destroy your files. You may want to make a backup of the directory you
are working in before you experiment.
On the next page we will talk about piping which is the close cousin of redirection.
![]() |
|
![]() |
![]() |
![]() |